diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2002-07-17 20:55:08 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2002-07-17 20:55:08 +0000 |
commit | 3e78a618a8085dba94e06a747be9a1f14b3db3fb (patch) | |
tree | e94d7d3d6fa92b3d494badedaa0e4a1c2310a196 /cpp/test | |
parent | Added .depend (diff) | |
download | ice-3e78a618a8085dba94e06a747be9a1f14b3db3fb.tar.bz2 ice-3e78a618a8085dba94e06a747be9a1f14b3db3fb.tar.xz ice-3e78a618a8085dba94e06a747be9a1f14b3db3fb.zip |
Mods for running IceBox services in python scripts
Diffstat (limited to 'cpp/test')
-rwxr-xr-x | cpp/test/IceStorm/federation/run.py | 22 | ||||
-rwxr-xr-x | cpp/test/IceStorm/federation2/run.py | 18 | ||||
-rwxr-xr-x | cpp/test/IceStorm/single/run.py | 19 | ||||
-rwxr-xr-x | cpp/test/Yellow/basicYellow/run.py | 7 |
4 files changed, 40 insertions, 26 deletions
diff --git a/cpp/test/IceStorm/federation/run.py b/cpp/test/IceStorm/federation/run.py index 80c1165ab4e..665df888c2b 100755 --- a/cpp/test/IceStorm/federation/run.py +++ b/cpp/test/IceStorm/federation/run.py @@ -25,6 +25,7 @@ name = os.path.join("IceStorm", "federation") testdir = os.path.join(toplevel, "test", name) iceBox = os.path.join(toplevel, "bin", "icebox") +iceBoxAdmin = os.path.join(toplevel, "bin", "iceboxadmin") iceStormAdmin = os.path.join(toplevel, "bin", "icestormadmin") updatedServerOptions = TestUtil.serverOptions.replace("TOPLEVELDIR", toplevel) @@ -32,8 +33,11 @@ updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel) updatedClientServerOptions = TestUtil.clientServerOptions.replace("TOPLEVELDIR", toplevel) iceBoxEndpoints=' --IceBox.ServiceManager.Endpoints="default -p 12345"' +iceBoxReference=' --IceBox.ServiceManager="ServiceManager: default -p 12345"' + iceStormService=" --IceBox.Service.IceStorm=IceStormService:create" + \ - ' --IceStorm.TopicManager.Endpoints="default -p 12346"' + ' --IceStorm.TopicManager.Endpoints="default -p 12346"' + \ + " --IceBox.PrintServicesReady=IceStorm" iceStormReference=' --IceStorm.TopicManager="IceStorm.TopicManager: default -p 12346"' dbEnvName = os.path.join(testdir, "db") @@ -44,7 +48,7 @@ print "starting icestorm service...", command = iceBox + updatedClientServerOptions + iceBoxEndpoints + iceStormService + iceStormDBEnv iceBoxPipe = os.popen(command) TestUtil.getServerPid(iceBoxPipe) -TestUtil.getAdapterReady(iceBoxPipe) +TestUtil.waitServiceReady(iceBoxPipe, "IceStorm") print "ok" print "creating topics...", @@ -163,20 +167,20 @@ print "ok" # # Shutdown icestorm. # -print "shutting down icestorm...", -command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "shutdown"' -iceStormAdminPipe = os.popen(command) -iceStormAdminStatus = iceStormAdminPipe.close() -if iceStormAdminStatus: +print "shutting down icestorm service...", +command = iceBoxAdmin + updatedClientOptions + iceBoxReference + r' shutdown' +iceBoxAdminPipe = os.popen(command) +iceBoxAdminStatus = iceBoxAdminPipe.close() +if iceBoxAdminStatus: TestUtil.killServers() sys.exit(1) print "ok" -iceStormStatus = iceBoxPipe.close() +iceBoxStatus = iceBoxPipe.close() subscriberStatus = subscriberPipe.close() publisherStatus = publisherPipe.close() -if iceStormStatus or subscriberStatus or publisherStatus: +if iceBoxStatus or subscriberStatus or publisherStatus: TestUtil.killServers() sys.exit(1) diff --git a/cpp/test/IceStorm/federation2/run.py b/cpp/test/IceStorm/federation2/run.py index d2c15d5d543..96aa71dcb24 100755 --- a/cpp/test/IceStorm/federation2/run.py +++ b/cpp/test/IceStorm/federation2/run.py @@ -25,6 +25,7 @@ testdir = os.path.join(toplevel, "test", "IceStorm", "federation2") exedir = os.path.join(toplevel, "test", "IceStorm", "federation") iceBox = os.path.join(toplevel, "bin", "icebox") +iceBoxAdmin = os.path.join(toplevel, "bin", "iceboxadmin") iceStormAdmin = os.path.join(toplevel, "bin", "icestormadmin") updatedServerOptions = TestUtil.serverOptions.replace("TOPLEVELDIR", toplevel) @@ -32,8 +33,11 @@ updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel) updatedClientServerOptions = TestUtil.clientServerOptions.replace("TOPLEVELDIR", toplevel) iceBoxEndpoints=' --IceBox.ServiceManager.Endpoints="default -p 12345"' +iceBoxReference=' --IceBox.ServiceManager="ServiceManager: default -p 12345"' + iceStormService=" --IceBox.Service.IceStorm=IceStormService:create" + \ - ' --IceStorm.TopicManager.Endpoints="default -p 12346"' + ' --IceStorm.TopicManager.Endpoints="default -p 12346"' + \ + " --IceBox.PrintServicesReady=IceStorm" iceStormReference=' --IceStorm.TopicManager="IceStorm.TopicManager: default -p 12346"' dbEnvName = os.path.join(testdir, "db") @@ -44,7 +48,7 @@ print "starting icestorm service...", command = iceBox + updatedClientServerOptions + iceBoxEndpoints + iceStormService + iceStormDBEnv iceBoxPipe = os.popen(command) TestUtil.getServerPid(iceBoxPipe) -TestUtil.getAdapterReady(iceBoxPipe) +TestUtil.waitServiceReady(iceBoxPipe, "IceStorm") print "ok" print "creating topics...", @@ -158,11 +162,11 @@ print "ok" # # Shutdown icestorm. # -print "shutting down icestorm...", -command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "shutdown"' -iceStormAdminPipe = os.popen(command) -iceStormAdminStatus = iceStormAdminPipe.close() -if iceStormAdminStatus: +print "shutting down icestorm service...", +command = iceBoxAdmin + updatedClientOptions + iceBoxReference + r' shutdown' +iceBoxAdminPipe = os.popen(command) +iceBoxAdminStatus = iceBoxAdminPipe.close() +if iceBoxAdminStatus: TestUtil.killServers() sys.exit(1) print "ok" diff --git a/cpp/test/IceStorm/single/run.py b/cpp/test/IceStorm/single/run.py index d2e658d2ff6..ecf13ec84d5 100755 --- a/cpp/test/IceStorm/single/run.py +++ b/cpp/test/IceStorm/single/run.py @@ -25,6 +25,7 @@ name = os.path.join("IceStorm", "single") testdir = os.path.join(toplevel, "test", name) iceBox = os.path.join(toplevel, "bin", "icebox") +iceBoxAdmin = os.path.join(toplevel, "bin", "iceboxadmin") iceStormAdmin = os.path.join(toplevel, "bin", "icestormadmin") updatedServerOptions = TestUtil.serverOptions.replace("TOPLEVELDIR", toplevel) @@ -32,8 +33,11 @@ updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel) updatedClientServerOptions = TestUtil.clientServerOptions.replace("TOPLEVELDIR", toplevel) iceBoxEndpoints=' --IceBox.ServiceManager.Endpoints="default -p 12345"' +iceBoxReference=' --IceBox.ServiceManager="ServiceManager: default -p 12345"' + iceStormService=" --IceBox.Service.IceStorm=IceStormService:create" + \ - ' --IceStorm.TopicManager.Endpoints="default -p 12346"' + ' --IceStorm.TopicManager.Endpoints="default -p 12346"' + \ + " --IceBox.PrintServicesReady=IceStorm" iceStormReference=' --IceStorm.TopicManager="IceStorm.TopicManager: default -p 12346"' dbEnvName = os.path.join(testdir, "db") @@ -44,7 +48,8 @@ print "starting icestorm service...", command = iceBox + updatedClientServerOptions + iceBoxEndpoints + iceStormService + iceStormDBEnv iceBoxPipe = os.popen(command) TestUtil.getServerPid(iceBoxPipe) -TestUtil.getAdapterReady(iceBoxPipe) +#TestUtil.getAdapterReady(iceBoxPipe) +TestUtil.waitServiceReady(iceBoxPipe, "IceStorm") print "ok" print "creating topic...", @@ -124,11 +129,11 @@ print "ok" # # Shutdown icestorm. # -print "shutting down icestorm...", -command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "shutdown"' -iceStormAdminPipe = os.popen(command) -iceStormAdminStatus = iceStormAdminPipe.close() -if iceStormAdminStatus: +print "shutting down icestorm service...", +command = iceBoxAdmin + updatedClientOptions + iceBoxReference + r' shutdown' +iceBoxAdminPipe = os.popen(command) +iceBoxAdminStatus = iceBoxAdminPipe.close() +if iceBoxAdminStatus: TestUtil.killServers() sys.exit(1) print "ok" diff --git a/cpp/test/Yellow/basicYellow/run.py b/cpp/test/Yellow/basicYellow/run.py index c1f2ba90b34..fb24061df4a 100755 --- a/cpp/test/Yellow/basicYellow/run.py +++ b/cpp/test/Yellow/basicYellow/run.py @@ -34,7 +34,8 @@ updatedClientServerOptions = TestUtil.clientServerOptions.replace("TOPLEVELDIR", IceBoxEndpoints=' --IceBox.ServiceManager.Endpoints="default -p 12345"' IceBoxReference=' --IceBox.ServiceManager="ServiceManager:default -p 12345"' YellowService=" --IceBox.Service.Yellow=YellowService:create" + \ - ' --Yellow.Query.Endpoints="default -p 12346" --Yellow.Admin.Endpoints="default -p 12347"' + ' --Yellow.Query.Endpoints="default -p 12346" --Yellow.Admin.Endpoints="default -p 12347"' + \ + ' --IceBox.PrintServicesReady=Yellow' dbEnvName = os.path.join(testdir, "db") TestUtil.cleanDbDir(dbEnvName) @@ -44,7 +45,7 @@ print "starting yellow service...", command = IceBox + updatedClientServerOptions + IceBoxEndpoints + YellowService + YellowDBEnv IceBoxPipe = os.popen(command) TestUtil.getServerPid(IceBoxPipe) -TestUtil.getAdapterReady(IceBoxPipe) +TestUtil.waitServiceReady(IceBoxPipe, "Yellow") print "ok" client = os.path.join(testdir, "client") @@ -62,7 +63,7 @@ for output in clientPipe.xreadlines(): # # Shutdown yellow. # -print "shutting down yellow...", +print "shutting down yellow service...", command = IceBoxAdmin + updatedClientOptions + IceBoxReference + r' shutdown' IceBoxAdminPipe = os.popen(command) IceBoxAdminStatus = IceBoxAdminPipe.close() |