diff options
Diffstat (limited to 'cpp/test/IceStorm/federation/run.py')
-rwxr-xr-x | cpp/test/IceStorm/federation/run.py | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/cpp/test/IceStorm/federation/run.py b/cpp/test/IceStorm/federation/run.py index 1b6ed930e93..727d0b42c97 100755 --- a/cpp/test/IceStorm/federation/run.py +++ b/cpp/test/IceStorm/federation/run.py @@ -32,42 +32,38 @@ 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) -updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel) -updatedClientServerOptions = TestUtil.clientServerOptions.replace("TOPLEVELDIR", toplevel) +iceBoxEndpoints = ' --IceBox.ServiceManager.Endpoints="default -p 12345"' -iceBoxEndpoints=' --IceBox.ServiceManager.Endpoints="default -p 12345"' - -iceStormService=" --IceBox.Service.IceStorm=IceStormService:create" + \ - ' --IceStorm.TopicManager.Endpoints="default -p 12346"' + \ - " --IceBox.PrintServicesReady=IceStorm" -iceStormReference=' --IceStorm.TopicManager.Proxy="IceStorm/TopicManager: default -p 12346"' +iceStormService = " --IceBox.Service.IceStorm=IceStormService:create" + \ + ' --IceStorm.TopicManager.Endpoints="default -p 12346"' + \ + " --IceBox.PrintServicesReady=IceStorm" +iceStormReference = ' --IceStorm.TopicManager.Proxy="IceStorm/TopicManager: default -p 12346"' dbEnvName = os.path.join(testdir, "db") TestUtil.cleanDbDir(dbEnvName) iceStormDBEnv=" --IceBox.DBEnvName.IceStorm=" + dbEnvName print "starting icestorm service...", -command = iceBox + updatedClientServerOptions + iceBoxEndpoints + iceStormService + iceStormDBEnv +command = iceBox + TestUtil.clientServerOptions + iceBoxEndpoints + iceStormService + iceStormDBEnv iceBoxPipe = os.popen(command) TestUtil.getServerPid(iceBoxPipe) TestUtil.waitServiceReady(iceBoxPipe, "IceStorm") print "ok" print "creating topics...", -command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "create fed1"' +command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "create fed1"' iceStormAdminPipe = os.popen(command) iceStormAdminStatus = iceStormAdminPipe.close() if iceStormAdminStatus: TestUtil.killServers() sys.exit(1) -command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "create fed2"' +command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "create fed2"' iceStormAdminPipe = os.popen(command) iceStormAdminStatus = iceStormAdminPipe.close() if iceStormAdminStatus: TestUtil.killServers() sys.exit(1) -command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "create fed3"' +command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "create fed3"' iceStormAdminPipe = os.popen(command) iceStormAdminStatus = iceStormAdminPipe.close() if iceStormAdminStatus: @@ -76,13 +72,13 @@ if iceStormAdminStatus: print "ok" print "linking topics...", -command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "link fed1 fed2 10"' +command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "link fed1 fed2 10"' iceStormAdminPipe = os.popen(command) iceStormAdminStatus = iceStormAdminPipe.close() if iceStormAdminStatus: TestUtil.killServers() sys.exit(1) -command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "link fed2 fed3 5"' +command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "link fed2 fed3 5"' iceStormAdminPipe = os.popen(command) iceStormAdminStatus = iceStormAdminPipe.close() if iceStormAdminStatus: @@ -104,7 +100,7 @@ except: pass # Ignore errors if the lockfile is not present print "starting subscriber...", -command = subscriber + updatedClientServerOptions + iceStormReference + r' ' + subscriberLockFile +command = subscriber + TestUtil.clientServerOptions + iceStormReference + r' ' + subscriberLockFile subscriberPipe = os.popen(command) TestUtil.getServerPid(subscriberPipe) TestUtil.getAdapterReady(subscriberPipe) @@ -122,7 +118,7 @@ print "ok" # causes subscriber to terminate. # print "starting publisher...", -command = publisher + updatedClientOptions + iceStormReference +command = publisher + TestUtil.clientOptions + iceStormReference publisherPipe = os.popen(command) print "ok" @@ -147,19 +143,19 @@ print "ok" # Destroy the topic. # print "destroying topics...", -command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "destroy fed1"' +command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "destroy fed1"' iceStormAdminPipe = os.popen(command) iceStormAdminStatus = iceStormAdminPipe.close() if iceStormAdminStatus: TestUtil.killServers() sys.exit(1) -command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "destroy fed2"' +command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "destroy fed2"' iceStormAdminPipe = os.popen(command) iceStormAdminStatus = iceStormAdminPipe.close() if iceStormAdminStatus: TestUtil.killServers() sys.exit(1) -command = iceStormAdmin + updatedClientOptions + iceStormReference + r' -e "destroy fed3"' +command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "destroy fed3"' iceStormAdminPipe = os.popen(command) iceStormAdminStatus = iceStormAdminPipe.close() if iceStormAdminStatus: @@ -171,7 +167,7 @@ print "ok" # Shutdown icestorm. # print "shutting down icestorm service...", -command = iceBoxAdmin + updatedClientOptions + iceBoxEndpoints + r' shutdown' +command = iceBoxAdmin + TestUtil.clientOptions + iceBoxEndpoints + r' shutdown' iceBoxAdminPipe = os.popen(command) iceBoxAdminStatus = iceBoxAdminPipe.close() if iceBoxAdminStatus: |