Rename SonarStep
Summary: Part of sonar to flipper rename Reviewed By: passy Differential Revision: D9920275 fbshipit-source-id: 02f97d1e51d58864283d26e8d3a724cac973e938
This commit is contained in:
committed by
Facebook Github Bot
parent
c1295b1bc9
commit
8ae77810d9
@@ -10,7 +10,7 @@
|
|||||||
#include "FlipperConnectionImpl.h"
|
#include "FlipperConnectionImpl.h"
|
||||||
#include "FlipperResponderImpl.h"
|
#include "FlipperResponderImpl.h"
|
||||||
#include "FlipperState.h"
|
#include "FlipperState.h"
|
||||||
#include "SonarStep.h"
|
#include "FlipperStep.h"
|
||||||
#include "FlipperConnectionManagerImpl.h"
|
#include "FlipperConnectionManagerImpl.h"
|
||||||
#include "ConnectionContextStore.h"
|
#include "ConnectionContextStore.h"
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
#include "FlipperConnectionManager.h"
|
#include "FlipperConnectionManager.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include "SonarStep.h"
|
#include "FlipperStep.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace facebook {
|
namespace facebook {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "FlipperConnectionManagerImpl.h"
|
#include "FlipperConnectionManagerImpl.h"
|
||||||
#include "SonarStep.h"
|
#include "FlipperStep.h"
|
||||||
#include "ConnectionContextStore.h"
|
#include "ConnectionContextStore.h"
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
#include <folly/String.h>
|
#include <folly/String.h>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "FlipperState.h"
|
#include "FlipperState.h"
|
||||||
#include "FlipperStateUpdateListener.h"
|
#include "FlipperStateUpdateListener.h"
|
||||||
#include "SonarStep.h"
|
#include "FlipperStep.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
using namespace facebook::flipper;
|
using namespace facebook::flipper;
|
||||||
@@ -63,7 +63,7 @@ std::vector<StateElement> FlipperState::getStateElements() {
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<SonarStep> FlipperState::start(std::string step_name) {
|
std::shared_ptr<FlipperStep> FlipperState::start(std::string step_name) {
|
||||||
started(step_name);
|
started(step_name);
|
||||||
return std::make_shared<SonarStep>(step_name, this);
|
return std::make_shared<FlipperStep>(step_name, this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
class SonarStep;
|
class FlipperStep;
|
||||||
class FlipperStateUpdateListener;
|
class FlipperStateUpdateListener;
|
||||||
|
|
||||||
namespace facebook {
|
namespace facebook {
|
||||||
@@ -32,7 +32,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
class FlipperState {
|
class FlipperState {
|
||||||
friend SonarStep;
|
friend FlipperStep;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FlipperState();
|
FlipperState();
|
||||||
@@ -41,10 +41,10 @@ class FlipperState {
|
|||||||
std::vector<facebook::flipper::StateElement> getStateElements();
|
std::vector<facebook::flipper::StateElement> getStateElements();
|
||||||
|
|
||||||
/* To record a state update, call start() with the name of the step to get a
|
/* To record a state update, call start() with the name of the step to get a
|
||||||
SonarStep object. Call complete on this to register it successful,
|
FlipperStep object. Call complete on this to register it successful,
|
||||||
the absense of the completion call when it is destructed will register as a
|
the absense of the completion call when it is destructed will register as a
|
||||||
step failure. */
|
step failure. */
|
||||||
std::shared_ptr<SonarStep> start(std::string step);
|
std::shared_ptr<FlipperStep> start(std::string step);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void success(std::string);
|
void success(std::string);
|
||||||
|
|||||||
@@ -5,25 +5,25 @@
|
|||||||
* file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "SonarStep.h"
|
#include "FlipperStep.h"
|
||||||
#include "FlipperState.h"
|
#include "FlipperState.h"
|
||||||
|
|
||||||
void SonarStep::complete() {
|
void FlipperStep::complete() {
|
||||||
isLogged = true;
|
isLogged = true;
|
||||||
state->success(name);
|
state->success(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SonarStep::fail(std::string message) {
|
void FlipperStep::fail(std::string message) {
|
||||||
isLogged = true;
|
isLogged = true;
|
||||||
state->failed(name, message);
|
state->failed(name, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
SonarStep::SonarStep(std::string step, FlipperState* s) {
|
FlipperStep::FlipperStep(std::string step, FlipperState* s) {
|
||||||
state = s;
|
state = s;
|
||||||
name = step;
|
name = step;
|
||||||
}
|
}
|
||||||
|
|
||||||
SonarStep::~SonarStep() {
|
FlipperStep::~FlipperStep() {
|
||||||
if (!isLogged) {
|
if (!isLogged) {
|
||||||
state->failed(name, "");
|
state->failed(name, "");
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
class FlipperState;
|
class FlipperState;
|
||||||
|
|
||||||
class SonarStep {
|
class FlipperStep {
|
||||||
public:
|
public:
|
||||||
/* Mark this step as completed successfully
|
/* Mark this step as completed successfully
|
||||||
* failing to call complete() will be registered as a failure
|
* failing to call complete() will be registered as a failure
|
||||||
@@ -22,8 +22,8 @@ class SonarStep {
|
|||||||
// Mark the step as failed, and provide a message.
|
// Mark the step as failed, and provide a message.
|
||||||
void fail(std::string message);
|
void fail(std::string message);
|
||||||
|
|
||||||
SonarStep(std::string name, FlipperState* state);
|
FlipperStep(std::string name, FlipperState* state);
|
||||||
~SonarStep();
|
~FlipperStep();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string name;
|
std::string name;
|
||||||
Reference in New Issue
Block a user