summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2012-11-30 11:58:22 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2012-11-30 11:58:22 +1100
commitb0099cb3e9402b99b50889f11f46c14ba424227a (patch)
tree0478d799c555b7b30fd9ed8909bc0292cb7f1ec0
parent940d129bb9ec41592a87f11523e6955cb874606b (diff)
downloadmongo-b0099cb3e9402b99b50889f11f46c14ba424227a.tar.gz
In the threaded checkpoint test, make sure threads have finished before closing the connection.
-rw-r--r--test/suite/test_checkpoint02.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/suite/test_checkpoint02.py b/test/suite/test_checkpoint02.py
index 73999517e63..bff10ff65e0 100644
--- a/test/suite/test_checkpoint02.py
+++ b/test/suite/test_checkpoint02.py
@@ -56,15 +56,17 @@ class test_checkpoint02(wttest.WiredTigerTestCase):
queue.put_nowait(('b', i, my_data))
queue.put_nowait(('i', i, my_data))
+ opthreads = []
for i in xrange(self.nthreads):
t = op_thread(self.conn, uris, self.fmt, queue, done)
+ opthreads.append(t)
t.start()
queue.join()
done.set()
- # Wait for checkpoint thread to notice status change.
- while ckpt.is_alive():
- time.sleep(0.01)
+ for t in opthreads:
+ t.join()
+ ckpt.join()
# Create a cursor - ensure all items have been put.
cursor = self.session.open_cursor(self.uri, None, None)