summaryrefslogtreecommitdiff
path: root/test/suite/helper.py
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2012-08-24 19:39:48 +0000
committerKeith Bostic <keith@wiredtiger.com>2012-08-24 19:39:48 +0000
commit1d1a385ce5532269945193689125c28e52adbb33 (patch)
tree0c590c4ab83b8af73e95f954b9194460a90a6b94 /test/suite/helper.py
parentf2a25792d7d0f6bce1a2bdf4452a6299f11332e7 (diff)
downloadmongo-1d1a385ce5532269945193689125c28e52adbb33.tar.gz
Give fixed-length column store objects random values.
Diffstat (limited to 'test/suite/helper.py')
-rw-r--r--test/suite/helper.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/suite/helper.py b/test/suite/helper.py
index 7ea864f7b2b..60dc9a40d5a 100644
--- a/test/suite/helper.py
+++ b/test/suite/helper.py
@@ -91,7 +91,11 @@ def value_populate(cursor, i):
elif value_format == 'S':
return str(i) + ': abcdefghijklmnopqrstuvwxyz'
elif value_format == '8t':
- return 0xab
+ value = (
+ 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xaa, 0xab,
+ 0xac, 0xad, 0xae, 0xaf, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,
+ 0xb7, 0xb8, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf)
+ return value[i % len(value)]
else:
raise AssertionError(
'value_populate: object has unexpected format: ' + value_format)
@@ -118,7 +122,9 @@ def simple_populate_check(self, uri):
for key,val in cursor:
i += 1
self.assertEqual(key, key_populate(cursor, i))
- self.assertEqual(val, value_populate(cursor, i))
+ if cursor.value_format == '8t' and val == 0: # deleted
+ continue;
+ self.assertEqual(val, value_populate(cursor, i))
cursor.close()
# population of a complex object