diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-12-09 17:23:28 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-12-09 17:23:28 +0100 |
commit | 0359b3a90b7499ec25e15e7c2d71cb60a7cc11ad (patch) | |
tree | f739aa5357d59ef49f8f8c57c1457eb016566e2b /cpp/test/IceGrid/fileLock/run.py | |
parent | LOG_AUTHPRIV and LOG_FTOP not defined on Solaris (diff) | |
download | ice-0359b3a90b7499ec25e15e7c2d71cb60a7cc11ad.tar.bz2 ice-0359b3a90b7499ec25e15e7c2d71cb60a7cc11ad.tar.xz ice-0359b3a90b7499ec25e15e7c2d71cb60a7cc11ad.zip |
Fixed IceGrid/fileLock test errors
Diffstat (limited to 'cpp/test/IceGrid/fileLock/run.py')
-rwxr-xr-x | cpp/test/IceGrid/fileLock/run.py | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/cpp/test/IceGrid/fileLock/run.py b/cpp/test/IceGrid/fileLock/run.py index 84ac73f0339..3f59916a570 100755 --- a/cpp/test/IceGrid/fileLock/run.py +++ b/cpp/test/IceGrid/fileLock/run.py @@ -20,7 +20,12 @@ if len(path) == 0: sys.path.append(os.path.join(path[0])) from scripts import * -def runIceGridRegistry(testdir): +testdir = os.getcwd(); + +# No need to spawn repliacs for this test. +IceGridAdmin.nreplicas = 0 + +def runIceGridRegistry(): iceGrid = "" if TestUtil.isBCC2010() or TestUtil.isVC6(): iceGrid = os.path.join(TestUtil.getServiceDir(), "icegridregistry") @@ -29,7 +34,7 @@ def runIceGridRegistry(testdir): command = ' --nowarn ' + IceGridAdmin.registryOptions - dataDir = os.path.join(testdir, "db") + dataDir = os.path.join(testdir, "db", "registry") if not os.path.exists(dataDir): os.mkdir(dataDir) @@ -45,15 +50,13 @@ def runIceGridRegistry(testdir): proc = TestUtil.spawn(cmd) return proc -IceGridAdmin.cleanDbDir("./db") +registryProcs = IceGridAdmin.startIceGridRegistry(testdir) print "testing IceGrid file lock...", -iceGrid1 = runIceGridRegistry(".") -iceGrid1.expect("[^\n]+ ready\n") - -iceGrid2 = runIceGridRegistry(".") -iceGrid2.expect(".*IceUtil::FileLockedException.*") +iceGrid = runIceGridRegistry() +iceGrid.expect(".*IceUtil::FileLockedException.*") +iceGrid.wait() print "ok" -IceGridAdmin.iceGridAdmin("registry shutdown") -IceGridAdmin.cleanDbDir("./db") +IceGridAdmin.shutdownIceGridRegistry(registryProcs) + |