diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-02-07 17:49:23 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-02-07 17:49:23 +0000 |
commit | 1d4d5b70635d91617a5272c1bde911a129baf713 (patch) | |
tree | 7b18cbda7c76a7fe2f1babd071c7b26f544d9b1a /cpp/config/TestUtil.py | |
parent | fixed syntax error (diff) | |
download | ice-1d4d5b70635d91617a5272c1bde911a129baf713.tar.bz2 ice-1d4d5b70635d91617a5272c1bde911a129baf713.tar.xz ice-1d4d5b70635d91617a5272c1bde911a129baf713.zip |
Fixed bug 1764
Diffstat (limited to 'cpp/config/TestUtil.py')
-rw-r--r-- | cpp/config/TestUtil.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py index 2df03b86bb0..48725dc2d0b 100644 --- a/cpp/config/TestUtil.py +++ b/cpp/config/TestUtil.py @@ -48,7 +48,7 @@ debug = 0 # # Don't change anything below this line! # -import sys, os, re, errno, getopt +import sys, os, re, errno, getopt, time from threading import Thread def usage(): @@ -218,7 +218,20 @@ def specificServerStatus(pipe, timeout = None): for t in serverThreads: if t.getPipe() == pipe: serverThreads.remove(t) - t.join(timeout) + if isWin32() and timeout != None: + # + # BUGFIX: On Windows x64 with python 2.5 join with + # a timeout doesn't work (it hangs for the duration + # of the timeout if the thread is alive at the time + # of the join call). + # + while timeout >= 0 and t.isAlive(): + time.sleep(1) + timeout -= 1 + if not t.isAlive(): + t.join() + else: + t.join(timeout) if t.isAlive(): raise "server with pipe " + str(pipe) + " did not exit within the timeout period." status = t.getStatus() |