summaryrefslogtreecommitdiff
path: root/test/suite/test_stat01.py
diff options
context:
space:
mode:
authorDon Anderson <dda@mongodb.com>2016-10-26 00:35:39 -0400
committerMichael Cahill <michael.cahill@mongodb.com>2016-10-26 15:35:39 +1100
commitef87391458eb9c4440f2f9dc1aa89b41363b6b9b (patch)
tree7d12b1466ea59910272c1f5fe2d5b48db052ca25 /test/suite/test_stat01.py
parentb6be49dd39979e55bf809111c71dce0389f6b728 (diff)
downloadmongo-ef87391458eb9c4440f2f9dc1aa89b41363b6b9b.tar.gz
WT-2947 replace test suite populate functions with *DataSet classes (#3083)
Diffstat (limited to 'test/suite/test_stat01.py')
-rw-r--r--test/suite/test_stat01.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/suite/test_stat01.py b/test/suite/test_stat01.py
index 1ad51ee9882..2b04a3cbcd5 100644
--- a/test/suite/test_stat01.py
+++ b/test/suite/test_stat01.py
@@ -28,7 +28,7 @@
import helper, wiredtiger, wttest
from wiredtiger import stat
-from helper import key_populate, simple_populate
+from wtdataset import SimpleDataSet, simple_key
from wtscenario import make_scenarios
# test_stat01.py
@@ -89,8 +89,8 @@ class test_stat01(wttest.WiredTigerTestCase):
# Test simple connection statistics.
def test_basic_conn_stats(self):
# Build an object and force some writes.
- config = self.config + ',key_format=' + self.keyfmt
- simple_populate(self, self.uri, config, 1000)
+ SimpleDataSet(self, self.uri, 1000,
+ config=self.config, key_format=self.keyfmt).populate()
self.session.checkpoint(None)
# See that we can get a specific stat value by its key and verify its
@@ -113,7 +113,7 @@ class test_stat01(wttest.WiredTigerTestCase):
value = ""
for i in range(1, self.nentries):
value = value + 1000 * "a"
- cursor[key_populate(cursor, i)] = value
+ cursor[simple_key(cursor, i)] = value
cursor.close()
# Force the object to disk, otherwise we can't check the overflow count.
@@ -140,9 +140,10 @@ class test_stat01(wttest.WiredTigerTestCase):
# Test simple per-checkpoint statistics.
def test_checkpoint_stats(self):
+ ds = SimpleDataSet(self, self.uri, self.nentries,
+ config=self.config, key_format=self.keyfmt)
for name in ('first', 'second', 'third'):
- config = self.config + ',key_format=' + self.keyfmt
- helper.simple_populate(self, self.uri, config, self.nentries)
+ ds.populate()
self.session.checkpoint('name=' + name)
cursor = self.session.open_cursor(
'statistics:' + self.uri, None, 'checkpoint=' + name)