summaryrefslogtreecommitdiff
path: root/test/suite/test_compress01.py
diff options
context:
space:
mode:
authorDon Anderson <dda@ddanderson.com>2015-11-30 16:50:15 -0500
committerDon Anderson <dda@ddanderson.com>2015-11-30 16:50:15 -0500
commit91a6c9254168c46409aa8fcb48687fcee16217c5 (patch)
treea76a653350e2a1c0677e60b2d4e47b5f7ea63394 /test/suite/test_compress01.py
parent2d01a566ba7b3576cb5b45af55479b3c06995589 (diff)
downloadmongo-91a6c9254168c46409aa8fcb48687fcee16217c5.tar.gz
WT-2142. At the end of a test run, all open connections should be closed
to prevent cascading errors. Clean up and (mostly) standardize how connection configuration is added to and modified. Details: - class TestSuiteConnection wraps an opened Connection, calls to close() remove it from the list of active connections. - WiredTigerTestCase.wiredtiger_open uses a TestSuiteConnection, and this version of wiredtiger_open is now used everywhere. - in tearDown(), active connections are explicitly closed. - In WiredTigerTestCase derived classes, we now use use self.conn_config if possible in tests in preference to overloading setUpConnectionOpen(). - Explicitly call close on extra connections created dynamically. - Remove some unused code.
Diffstat (limited to 'test/suite/test_compress01.py')
-rw-r--r--test/suite/test_compress01.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/test/suite/test_compress01.py b/test/suite/test_compress01.py
index 17d87403a0f..a9b97143b0c 100644
--- a/test/suite/test_compress01.py
+++ b/test/suite/test_compress01.py
@@ -52,13 +52,8 @@ class test_compress01(wttest.WiredTigerTestCase):
nrecords = 10000
bigvalue = "abcdefghij" * 1000
- # Override WiredTigerTestCase, we have extensions.
- def setUpConnectionOpen(self, dir):
- conn = wiredtiger.wiredtiger_open( dir, 'create,' +
- ('error_prefix="%s: ",' % self.shortid()) +
- self.extensionArg(self.compress))
- self.pr(`conn`)
- return conn
+ conn_config = lambda self, dir: \
+ self.extensionArg(self.compress)
# Return the wiredtiger_open extension argument for a shared library.
def extensionArg(self, name):