summaryrefslogtreecommitdiff
path: root/test/suite/wtthread.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/suite/wtthread.py')
-rw-r--r--test/suite/wtthread.py47
1 files changed, 26 insertions, 21 deletions
diff --git a/test/suite/wtthread.py b/test/suite/wtthread.py
index 33c5c61e00f..7f447e36038 100644
--- a/test/suite/wtthread.py
+++ b/test/suite/wtthread.py
@@ -70,30 +70,35 @@ class backup_thread(threading.Thread):
cursor.close()
- bkp_conn = wiredtiger.wiredtiger_open(self.backup_dir)
- bkp_session = bkp_conn.open_session()
- # Verify that the backup was OK.
- uris = list()
- for next_file in files:
- if next_file.startswith("WiredTiger"):
- continue
- uri = "file:" + next_file
- uris.append(uri)
+ bkp_conn = None
+ try:
+ bkp_conn = wiredtiger.wiredtiger_open(self.backup_dir)
+ bkp_session = bkp_conn.open_session()
+ # Verify that the backup was OK.
+ uris = list()
+ for next_file in files:
+ if next_file.startswith("WiredTiger"):
+ continue
+ uri = "file:" + next_file
+ uris.append(uri)
- # TODO: We want a self.assertTrue here - but need to be a wttest to
- # do that..
- if not compare_tables(
+ # TODO: We want a self.assertTrue here - be need to be a
+ # wttest to do that..
+ if not compare_tables(
self, sess, uris, "checkpoint=WiredTigerCheckpoint"):
- print "Error: checkpoint tables differ."
- else:
- wttest.WiredTigerTestCase.printVerbose(
- 3, "Checkpoint tables match")
+ print "Error: checkpoint tables differ."
+ else:
+ wttest.WiredTigerTestCase.printVerbose(
+ 3, "Checkpoint tables match")
- if not compare_tables(self, bkp_session, uris):
- print "Error: backup tables differ."
- else:
- wttest.WiredTigerTestCase.printVerbose(3, "Backup tables match")
- bkp_conn.close()
+ if not compare_tables(self, bkp_session, uris):
+ print "Error: backup tables differ."
+ else:
+ wttest.WiredTigerTestCase.printVerbose(
+ 3, "Backup tables match")
+ finally:
+ if bkp_conn != None:
+ bkp_conn.close()
sess.close()