summaryrefslogtreecommitdiff
path: root/cpp/test/IceStorm/federation/Publisher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/IceStorm/federation/Publisher.cpp')
-rw-r--r--cpp/test/IceStorm/federation/Publisher.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/cpp/test/IceStorm/federation/Publisher.cpp b/cpp/test/IceStorm/federation/Publisher.cpp
index d9ee2935453..d5273b081be 100644
--- a/cpp/test/IceStorm/federation/Publisher.cpp
+++ b/cpp/test/IceStorm/federation/Publisher.cpp
@@ -24,52 +24,52 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator)
string managerProxy = properties->getProperty(managerProxyProperty);
if(managerProxy.empty())
{
- cerr << argv[0] << ": property `" << managerProxyProperty << "' is not set" << endl;
- return EXIT_FAILURE;
+ cerr << argv[0] << ": property `" << managerProxyProperty << "' is not set" << endl;
+ return EXIT_FAILURE;
}
ObjectPrx base = communicator->stringToProxy(managerProxy);
IceStorm::TopicManagerPrx manager = IceStorm::TopicManagerPrx::checkedCast(base);
if(!manager)
{
- cerr << argv[0] << ": `" << managerProxy << "' is not running" << endl;
- return EXIT_FAILURE;
+ cerr << argv[0] << ": `" << managerProxy << "' is not running" << endl;
+ return EXIT_FAILURE;
}
TopicPrx fed1;
try
{
- fed1 = manager->retrieve("fed1");
+ fed1 = manager->retrieve("fed1");
}
catch(const NoSuchTopic& e)
{
- cerr << argv[0] << ": NoSuchTopic: " << e.name << endl;
- return EXIT_FAILURE;
-
+ cerr << argv[0] << ": NoSuchTopic: " << e.name << endl;
+ return EXIT_FAILURE;
+
}
TopicPrx fed2;
try
{
- fed2 = manager->retrieve("fed2");
+ fed2 = manager->retrieve("fed2");
}
catch(const NoSuchTopic& e)
{
- cerr << argv[0] << ": NoSuchTopic: " << e.name << endl;
- return EXIT_FAILURE;
-
+ cerr << argv[0] << ": NoSuchTopic: " << e.name << endl;
+ return EXIT_FAILURE;
+
}
TopicPrx fed3;
try
{
- fed3 = manager->retrieve("fed3");
+ fed3 = manager->retrieve("fed3");
}
catch(const NoSuchTopic& e)
{
- cerr << argv[0] << ": NoSuchTopic: " << e.name << endl;
- return EXIT_FAILURE;
-
+ cerr << argv[0] << ": NoSuchTopic: " << e.name << endl;
+ return EXIT_FAILURE;
+
}
EventPrx eventFed1 = EventPrx::uncheckedCast(fed1->getPublisher()->ice_oneway());
@@ -82,37 +82,37 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator)
context["cost"] = "0";
for(i = 0; i < 10; ++i)
{
- eventFed1->pub("fed1:0", context);
+ eventFed1->pub("fed1:0", context);
}
context["cost"] = "10";
for(i = 0; i < 10; ++i)
{
- eventFed1->pub("fed1:10", context);
+ eventFed1->pub("fed1:10", context);
}
context["cost"] = "15";
for(i = 0; i < 10; ++i)
{
- eventFed1->pub("fed1:15", context);
+ eventFed1->pub("fed1:15", context);
}
context["cost"] = "0";
for(i = 0; i < 10; ++i)
{
- eventFed2->pub("fed2:0", context);
+ eventFed2->pub("fed2:0", context);
}
context["cost"] = "5";
for(i = 0; i < 10; ++i)
{
- eventFed2->pub("fed2:5", context);
+ eventFed2->pub("fed2:5", context);
}
context["cost"] = "0";
for(i = 0; i < 10; ++i)
{
- eventFed3->pub("fed3:0", context);
+ eventFed3->pub("fed3:0", context);
}
//
@@ -134,26 +134,26 @@ main(int argc, char* argv[])
try
{
- communicator = initialize(argc, argv);
- status = run(argc, argv, communicator);
+ communicator = initialize(argc, argv);
+ status = run(argc, argv, communicator);
}
catch(const Exception& ex)
{
- cerr << ex << endl;
- status = EXIT_FAILURE;
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
}
if(communicator)
{
- try
- {
- communicator->destroy();
- }
- catch(const Exception& ex)
- {
- cerr << ex << endl;
- status = EXIT_FAILURE;
- }
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
}
return status;