Formatting

This commit is contained in:
Alexey Rybalchenko 2019-02-06 16:37:47 +01:00 committed by Dennis Klein
parent 62781389d4
commit 36f409dc72
28 changed files with 68 additions and 68 deletions

View File

@ -57,7 +57,7 @@ class FairMQSink : public FairMQDevice//, public OutputPolicy
LOG(info) << "Starting the benchmark and expecting to receive " << fMaxIterations << " messages.";
auto tStart = std::chrono::high_resolution_clock::now();
while (CheckCurrentState(RUNNING))
while (!NewStatePending())
{
if (fMultipart)
{

View File

@ -58,7 +58,7 @@ FairMQProgOptions::FairMQProgOptions()
fMQOptions.add_options()
("id", po::value<string>(), "Device ID (required argument).")
("io-threads", po::value<int >()->default_value(1), "Number of I/O threads.")
("transport", po::value<string>()->default_value("zeromq"), "Transport ('zeromq'/'nanomsg'/'shmem') .")
("transport", po::value<string>()->default_value("zeromq"), "Transport ('zeromq'/'nanomsg'/'shmem').")
("network-interface", po::value<string>()->default_value("default"), "Network interface to bind on (e.g. eth0, ib0..., default will try to detect the interface of the default route).")
("config-key", po::value<string>(), "Use provided value instead of device id for fetching the configuration from the config file.")
("initialization-timeout", po::value<int >()->default_value(120), "Timeout for the initialization in seconds (when expecting dynamic initialization).")

View File

@ -22,15 +22,15 @@ TEST_F(PluginServices, ConfigSynchronous)
{
mServices.SubscribeToDeviceStateChange("test",[&](DeviceState newState){
switch (newState) {
case DeviceState::InitializingDevice:
mServices.SetProperty<int>("blubb", 42);
break;
case DeviceState::DeviceReady:
EXPECT_EQ(mServices.GetProperty<int>("blubb"), 42);
EXPECT_EQ(mServices.GetPropertyAsString("blubb"), fair::mq::tools::ToString(42));
break;
default:
break;
case DeviceState::InitializingDevice:
mServices.SetProperty<int>("blubb", 42);
break;
case DeviceState::DeviceReady:
EXPECT_EQ(mServices.GetProperty<int>("blubb"), 42);
EXPECT_EQ(mServices.GetPropertyAsString("blubb"), fair::mq::tools::ToString(42));
break;
default:
break;
}
});
}
@ -39,11 +39,11 @@ TEST_F(PluginServices, ConfigInvalidStateError)
{
mServices.SubscribeToDeviceStateChange("test",[&](DeviceState newState){
switch (newState) {
case DeviceState::DeviceReady:
ASSERT_THROW(mServices.SetProperty<int>("blubb", 42), fair::mq::PluginServices::InvalidStateError);
break;
default:
break;
case DeviceState::DeviceReady:
ASSERT_THROW(mServices.SetProperty<int>("blubb", 42), fair::mq::PluginServices::InvalidStateError);
break;
default:
break;
}
});
}