diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-10-03 18:17:00 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2016-10-03 18:17:00 +0200 |
commit | 6e40c7719b2f64c4c1750d6964750975fe2242a2 (patch) | |
tree | f07055c9f7e5f75db16a60f70bdb9d9be409f67f /cpp | |
parent | Fix ICE-7399 - IcePatch2 progress size calculation (diff) | |
download | ice-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')
-rwxr-xr-x | cpp/config/Make.rules.mak | 18 | ||||
-rw-r--r-- | cpp/test/IceStorm/stress/Publisher.cpp | 9 | ||||
-rwxr-xr-x | cpp/test/IceStorm/stress/run.py | 16 |
3 files changed, 25 insertions, 18 deletions
diff --git a/cpp/config/Make.rules.mak b/cpp/config/Make.rules.mak index 37e3109b55d..8041fd1e47f 100755 --- a/cpp/config/Make.rules.mak +++ b/cpp/config/Make.rules.mak @@ -204,30 +204,30 @@ EXPAT_NUPKG = $(EXPAT_HOME)\expat.$(PLATFORMTOOLSET).nupkg NUGET = $(LOCALAPPDATA)\ZeroC\nuget\nuget.exe -$(NUGET): +"$(NUGET)": @if not exist "$(LOCALAPPDATA)\ZeroC\nuget" $(MKDIR) "$(LOCALAPPDATA)\ZeroC\nuget" powershell -Command "(New-Object Net.WebClient).DownloadFile('http://nuget.org/nuget.exe', '$(NUGET)')" -$(BZIP2_NUPKG): $(NUGET) +$(BZIP2_NUPKG): "$(NUGET)" @if not exist "$(PKG_DIR)" $(MKDIR) "$(PKG_DIR)" @if exist "$(PKG_DIR)\bzip2.$(PLATFORMTOOLSET)" rd /s /q "$(PKG_DIR)\bzip2.$(PLATFORMTOOLSET)" - $(NUGET) install bzip2.$(PLATFORMTOOLSET) -OutputDirectory "$(PKG_DIR)" -Version $(BZIP2_VERSION) -ExcludeVersion + "$(NUGET)" install bzip2.$(PLATFORMTOOLSET) -OutputDirectory "$(PKG_DIR)" -Version $(BZIP2_VERSION) -ExcludeVersion -$(MCPP_NUPKG): $(NUGET) +$(MCPP_NUPKG): "$(NUGET)" @if not exist "$(PKG_DIR)" $(MKDIR) "$(PKG_DIR)" @if exist "$(PKG_DIR)\mcpp.$(PLATFORMTOOLSET)" rd /s /q "$(PKG_DIR)\mcpp.$(PLATFORMTOOLSET)" - $(NUGET) install mcpp.$(PLATFORMTOOLSET) -OutputDirectory "$(PKG_DIR)" -Version $(MCPP_VERSION) -ExcludeVersion + "$(NUGET)" install mcpp.$(PLATFORMTOOLSET) -OutputDirectory "$(PKG_DIR)" -Version $(MCPP_VERSION) -ExcludeVersion !if "$(CPP_COMPILER)" != "VC100" -$(DB_NUPKG): $(NUGET) +$(DB_NUPKG): "$(NUGET)" @if not exist "$(PKG_DIR)" $(MKDIR) "$(PKG_DIR)" @if exist "$(PKG_DIR)\berkeley.db.$(PLATFORMTOOLSET)" rd /s /q "$(PKG_DIR)\berkeley.db.$(PLATFORMTOOLSET)" - $(NUGET) install berkeley.db.$(PLATFORMTOOLSET) -OutputDirectory "$(PKG_DIR)" -Version $(DB_VERSION) -ExcludeVersion + "$(NUGET)" install berkeley.db.$(PLATFORMTOOLSET) -OutputDirectory "$(PKG_DIR)" -Version $(DB_VERSION) -ExcludeVersion -$(EXPAT_NUPKG): $(NUGET) +$(EXPAT_NUPKG): "$(NUGET)" @if not exist "$(PKG_DIR)" $(MKDIR) "$(PKG_DIR)" @if exist "$(PKG_DIR)\expat.$(PLATFORMTOOLSET)" rd /s /q "$(PKG_DIR)\expat.$(PLATFORMTOOLSET)" - $(NUGET) install expat.$(PLATFORMTOOLSET) -OutputDirectory "$(PKG_DIR)" -Version $(EXPAT_VERSION) -ExcludeVersion + "$(NUGET)" install expat.$(PLATFORMTOOLSET) -OutputDirectory "$(PKG_DIR)" -Version $(EXPAT_VERSION) -ExcludeVersion !endif !endif 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); } diff --git a/cpp/test/IceStorm/stress/run.py b/cpp/test/IceStorm/stress/run.py index 805c8283a31..ed8eb9b2d48 100755 --- a/cpp/test/IceStorm/stress/run.py +++ b/cpp/test/IceStorm/stress/run.py @@ -177,21 +177,21 @@ def runtest(type): sys.stdout.write("Sending 5000 ordered events with max queue size drop events... ") sys.stdout.flush() - server1.start(echo=False, - additionalOptions = ' --IceStorm.Send.QueueSizeMax=4000 --IceStorm.Send.QueueSizeMaxPolicy=DropEvents') + opts = " --IceStorm.Send.QueueSizeMax=2000 --IceStorm.Send.QueueSizeMaxPolicy=DropEvents" + server1.start(echo=False, additionalOptions = opts) doTest(server1, - '--events 5000 --qos "reliability,ordered" --maxQueueDropEvents=4000 ' + server1.reference(), - '--events 5000') + '--events 5000 --qos "reliability,ordered" --maxQueueDropEvents=2000 ' + server1.reference(), + '--events 5000 --maxQueueTest') server1.stop() print("ok") sys.stdout.write("Sending 5000 ordered events with max queue size remove subscriber... ") sys.stdout.flush() - server1.start(echo=False, - additionalOptions = ' --IceStorm.Send.QueueSizeMax=4000 --IceStorm.Send.QueueSizeMaxPolicy=RemoveSubscriber') + opts = " --IceStorm.Send.QueueSizeMax=2000 --IceStorm.Send.QueueSizeMaxPolicy=RemoveSubscriber" + server1.start(echo=False, additionalOptions = opts) doTest(server1, - '--events 5000 --qos "reliability,ordered" --maxQueueRemoveSub=4000 ' + server1.reference(), - '--events 5000') + '--events 5000 --qos "reliability,ordered" --maxQueueRemoveSub=2000 ' + server1.reference(), + '--events 5000 --maxQueueTest') server1.stop() print("ok") |