summaryrefslogtreecommitdiff
path: root/test/suite
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-05-23 12:32:21 -0400
committerKeith Bostic <keith@wiredtiger.com>2013-05-23 12:32:21 -0400
commit7b8e1086a8beeea49e31c3b7d233bf4a6d337d6b (patch)
tree09278915bf81f9e5f8f20eafef729b250b1f3f32 /test/suite
parent76ed88b2eca3f65fb505ca06fe1ff0146f3cd5cd (diff)
downloadmongo-7b8e1086a8beeea49e31c3b7d233bf4a6d337d6b.tar.gz
If the default leaf/internal page size is 4KB, then setting it to
something smaller requires setting the allocation size as well, because page sizes must be multiples of the allocation size.
Diffstat (limited to 'test/suite')
-rw-r--r--test/suite/test_bug004.py2
-rw-r--r--test/suite/test_checkpoint01.py3
-rw-r--r--test/suite/test_compact.py2
-rw-r--r--test/suite/test_cursor_random.py10
-rw-r--r--test/suite/test_empty.py4
-rw-r--r--test/suite/test_truncate01.py9
-rw-r--r--test/suite/test_truncate02.py5
-rw-r--r--test/suite/test_truncate03.py2
-rw-r--r--test/suite/wtscenario.py4
9 files changed, 26 insertions, 15 deletions
diff --git a/test/suite/test_bug004.py b/test/suite/test_bug004.py
index 0c2b9e43c83..8bd2bcaf012 100644
--- a/test/suite/test_bug004.py
+++ b/test/suite/test_bug004.py
@@ -39,7 +39,7 @@ class test_bug004(wttest.WiredTigerTestCase):
uri = 'file:test_ovfl_key'
# Use a small page size because we want to create overflow items
- config = 'leaf_page_max=512,value_format=S,key_format=S'
+ config = 'allocation_size=512,leaf_page_max=512,value_format=S,key_format=S'
nentries = 30
diff --git a/test/suite/test_checkpoint01.py b/test/suite/test_checkpoint01.py
index 1e21b0f0155..6e1dd2e6385 100644
--- a/test/suite/test_checkpoint01.py
+++ b/test/suite/test_checkpoint01.py
@@ -113,7 +113,8 @@ class test_checkpoint(wttest.WiredTigerTestCase):
# Build a file with a set of checkpoints, and confirm they all have
# the correct key/value pairs.
self.session.create(self.uri,
- "key_format=" + self.fmt + ",value_format=S,leaf_page_max=512")
+ "key_format=" + self.fmt +\
+ ",value_format=S,allocation_size=512,leaf_page_max=512")
self.build_file_with_checkpoints()
self.check()
diff --git a/test/suite/test_compact.py b/test/suite/test_compact.py
index 2f3a3b6e052..6348054dc3d 100644
--- a/test/suite/test_compact.py
+++ b/test/suite/test_compact.py
@@ -37,7 +37,7 @@ class test_compact(wttest.WiredTigerTestCase, suite_subprocess):
name = 'test_compact'
# Use a small page size because we want to create lots of pages.
- config = 'leaf_page_max=512,value_format=S,key_format=S'
+ config = 'allocation_size=512,leaf_page_max=512,value_format=S,key_format=S'
nentries = 40000
types = [
diff --git a/test/suite/test_cursor_random.py b/test/suite/test_cursor_random.py
index 95f8540f156..56d4fee285c 100644
--- a/test/suite/test_cursor_random.py
+++ b/test/suite/test_cursor_random.py
@@ -75,11 +75,13 @@ class test_cursor_random(wttest.WiredTigerTestCase):
def test_cursor_random_multiple_records(self):
uri = self.type + 'random'
if self.type == 'file:':
- simple_populate(
- self, uri, 'leaf_page_max=512,key_format=' + self.fmt, 10000)
+ simple_populate(self, uri,
+ 'allocation_size=512,leaf_page_max=512,key_format=' +\
+ self.fmt, 10000)
else:
- complex_populate(
- self, uri, 'leaf_page_max=512,key_format=' + self.fmt, 10000)
+ complex_populate(self, uri,
+ 'allocation_size=512,leaf_page_max=512,key_format=' +\
+ self.fmt, 10000)
# Close the connection so everything is forced to disk (otherwise the
# values are on an insert list and the underlying engine doesn't make
diff --git a/test/suite/test_empty.py b/test/suite/test_empty.py
index a7dbc760573..c4d745e9a6f 100644
--- a/test/suite/test_empty.py
+++ b/test/suite/test_empty.py
@@ -49,7 +49,7 @@ class test_empty(wttest.WiredTigerTestCase):
name = self.name
if self.type == "table:":
name = name + '.wt'
- self.assertEquals(os.stat(name).st_size, 512)
+ self.assertEquals(os.stat(name).st_size, 4*1024)
# Open a new sesssion, add a few rows to an object and then remove them,
# then close the object. We open/close the object so it's flushed from
@@ -81,7 +81,7 @@ class test_empty(wttest.WiredTigerTestCase):
name = self.name
if self.type == "table:":
name = name + '.wt'
- self.assertEquals(os.stat(name).st_size, 512)
+ self.assertEquals(os.stat(name).st_size, 4*1024)
# Creating an object, inserting and removing records (that is, building an
# empty, dirty tree), shouldn't write any blocks. This doesn't work for
diff --git a/test/suite/test_truncate01.py b/test/suite/test_truncate01.py
index 8bc2182f6fb..fcac125bd3f 100644
--- a/test/suite/test_truncate01.py
+++ b/test/suite/test_truncate01.py
@@ -182,10 +182,13 @@ class test_truncate_cursor(wttest.WiredTigerTestCase):
# The underlying table routines don't easily support 8t value types, limit
# those tests to file objects.
types = [
- ('file', dict(type='file:',config='leaf_page_max=512,key_format=')),
+ ('file', dict(type='file:',\
+ config='allocation_size=512,leaf_page_max=512,key_format=')),
('file8t', dict(type='file:',\
- config='leaf_page_max=512,value_format=8t,key_format=')),
- ('table', dict(type='table:',config='leaf_page_max=512,key_format=')),
+ config='allocation_size=512,\
+ leaf_page_max=512,value_format=8t,key_format=')),
+ ('table', dict(type='table:',\
+ config='allocation_size=512,leaf_page_max=512,key_format=')),
]
keyfmt = [
('integer', dict(keyfmt='i')),
diff --git a/test/suite/test_truncate02.py b/test/suite/test_truncate02.py
index e77eba747aa..24cb8ce9316 100644
--- a/test/suite/test_truncate02.py
+++ b/test/suite/test_truncate02.py
@@ -44,8 +44,9 @@ class test_truncate_fast_delete(wttest.WiredTigerTestCase):
# Use a small page size and lots of keys because we want to create lots
# of individual pages in the file.
types = [
- ('file', dict(type='file:',\
- config='leaf_page_max=512,value_format=S,key_format=')),
+ ('file', dict(type='file:', config=\
+ 'allocation_size=512,leaf_page_max=512,' +\
+ 'value_format=S,key_format=')),
]
# This is all about testing the btree layer, not the schema layer, test
diff --git a/test/suite/test_truncate03.py b/test/suite/test_truncate03.py
index be09d778a56..4b497999df3 100644
--- a/test/suite/test_truncate03.py
+++ b/test/suite/test_truncate03.py
@@ -38,7 +38,7 @@ class test_truncate_address_deleted(wttest.WiredTigerTestCase):
# Use a small page size and lots of keys because we want to create lots
# of individual pages in the file.
nentries = 10000
- config = 'leaf_page_max=512,value_format=S,key_format=S'
+ config = 'allocation_size=512,leaf_page_max=512,value_format=S,key_format=S'
# address_deleted routine:
# Create an object that has a bunch of address-deleted cells on disk.
diff --git a/test/suite/wtscenario.py b/test/suite/wtscenario.py
index e7e164d8247..7091052e356 100644
--- a/test/suite/wtscenario.py
+++ b/test/suite/wtscenario.py
@@ -218,8 +218,12 @@ class wtscenario:
res += ',internal_item_max=' + str(self.ioverflow)
if hasattr(self, 'imax'):
res += ',internal_page_max=' + str(self.imax)
+ if self.imax < 4*1024:
+ res += ',allocation_size=512'
if hasattr(self, 'loverflow'):
res += ',leaf_item_max=' + str(self.loverflow)
if hasattr(self, 'lmax'):
res += ',leaf_page_max=' + str(self.lmax)
+ if self.lmax < 4*1024:
+ res += ',allocation_size=512'
return res