mirror of https://gitee.com/bigwinds/arangodb
added test
This commit is contained in:
parent
00bffcda28
commit
f552d61f26
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue