summaryrefslogtreecommitdiff
path: root/cpp/test/IceStorm/stress/Publisher.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-10-03 18:17:00 +0200
committerBenoit Foucher <benoit@zeroc.com>2016-10-03 18:17:00 +0200
commit6e40c7719b2f64c4c1750d6964750975fe2242a2 (patch)
treef07055c9f7e5f75db16a60f70bdb9d9be409f67f /cpp/test/IceStorm/stress/Publisher.cpp
parentFix ICE-7399 - IcePatch2 progress size calculation (diff)
downloadice-6e40c7719b2f64c4c1750d6964750975fe2242a2.tar.bz2
ice-6e40c7719b2f64c4c1750d6964750975fe2242a2.tar.xz
ice-6e40c7719b2f64c4c1750d6964750975fe2242a2.zip
Fixed ICE-7406 - IceStorm/stress test hang on W2008R2, fixes to allow building Ice from directory with spaces
Diffstat (limited to 'cpp/test/IceStorm/stress/Publisher.cpp')
-rw-r--r--cpp/test/IceStorm/stress/Publisher.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/cpp/test/IceStorm/stress/Publisher.cpp b/cpp/test/IceStorm/stress/Publisher.cpp
index b83347b2658..6b9c7801f68 100644
--- a/cpp/test/IceStorm/stress/Publisher.cpp
+++ b/cpp/test/IceStorm/stress/Publisher.cpp
@@ -23,6 +23,7 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator)
IceUtilInternal::Options opts;
opts.addOpt("", "events", IceUtilInternal::Options::NeedArg);
opts.addOpt("", "oneway");
+ opts.addOpt("", "maxQueueTest");
try
{
@@ -47,6 +48,7 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator)
}
bool oneway = opts.isSet("oneway");
+ bool maxQueueTest = opts.isSet("maxQueueTest");
PropertiesPtr properties = communicator->getProperties();
const char* managerProxyProperty = "IceStormAdmin.TopicManager.Default";
@@ -74,7 +76,7 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator)
{
cerr << argv[0] << ": NoSuchTopic: " << e.name << endl;
return EXIT_FAILURE;
-
+
}
EventPrx twowayProxy = EventPrx::uncheckedCast(topic->getPublisher()->ice_twoway());
@@ -90,6 +92,11 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator)
for(int i = 0; i < events; ++i)
{
+ if(maxQueueTest && i == 10)
+ {
+ // Sleep one seconds to give some time to IceStorm to connect to the subscriber
+ IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(1));
+ }
proxy->pub(i);
}