1
0
Fork 0

added test

This commit is contained in:
Jan Steemann 2016-02-08 12:00:21 +01:00
parent 00bffcda28
commit f552d61f26
2 changed files with 16 additions and 1 deletions

View File

@ -2268,7 +2268,7 @@ static void JS_PropertiesVocbaseCol(
2 /*Just for validation, this default Value passes*/);
if (tmp == 0 || tmp > 1024) {
TRI_V8_THROW_EXCEPTION_PARAMETER(
"indexBucket must be a two-power between 1 and 1024");
"indexBuckets must be a two-power between 1 and 1024");
}
info.update(slice, false, collection->_vocbase);
}

View File

@ -49,6 +49,11 @@ function runSetup () {
c = db._create("UnitTestsRecovery3");
c.properties({ waitForSync: false, journalSize: 16 * 1024 * 1024, doCompact: true });
c.properties({ waitForSync: true, journalSize: 4 * 1024 * 1024, doCompact: false });
db._drop("UnitTestsRecovery4");
c = db._create("UnitTestsRecovery4");
c.properties({ waitForSync: false, indexBuckets: 16 });
c.properties({ waitForSync: true, indexBuckets: 32 });
c.save({ _key: "foo" }, true);
@ -81,18 +86,28 @@ function recoverySuite () {
assertTrue(prop.waitForSync);
assertEqual(8 * 1024 * 1024, prop.journalSize);
assertFalse(prop.doCompact);
assertEqual(8, prop.indexBuckets);
c = db._collection("UnitTestsRecovery2");
prop = c.properties();
assertFalse(prop.waitForSync);
assertEqual(16 * 1024 * 1024, prop.journalSize);
assertTrue(prop.doCompact);
assertEqual(8, prop.indexBuckets);
c = db._collection("UnitTestsRecovery3");
prop = c.properties();
assertTrue(prop.waitForSync);
assertEqual(4 * 1024 * 1024, prop.journalSize);
assertFalse(prop.doCompact);
assertEqual(8, prop.indexBuckets);
c = db._collection("UnitTestsRecovery4");
prop = c.properties();
assertTrue(prop.waitForSync);
assertEqual(32 * 1024 * 1024, prop.journalSize);
assertTrue(prop.doCompact);
assertEqual(32, prop.indexBuckets);
}
};