mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
test more
This commit is contained in:
parent
a62ab9a7f4
commit
0afe00a0d5
@ -35,6 +35,31 @@ assert(v.ok);
|
||||
assert(t.stats().storageSize > ssize, "expected more storage given padding is higher. however it rounds off so if something changed this could be");
|
||||
//printjson(t.stats());
|
||||
|
||||
print("z");
|
||||
|
||||
t.insert({ x: 4, z: 2, k: { a: "", b: ""} });
|
||||
t.insert({ x: 4, z: 2, k: { a: "", b: ""} });
|
||||
t.insert({ x: 4, z: 2, k: { a: "", b: ""} });
|
||||
t.insert({ x: 4, z: 2, k: { a: "", b: ""} });
|
||||
t.insert({ x: 4, z: null, k: { a: "", b: ""} });
|
||||
t.insert({ x: 4, z: null, k: { c: ""} });
|
||||
t.insert({ x: 4, z: null });
|
||||
t.insert({ x: 4, z: 3});
|
||||
t.insert({ x: 4, z: 2, k: { a: "", b: ""} });
|
||||
t.insert({ x: 4, z: null, k: { c: ""} });
|
||||
t.insert({ x: 4, z: null, k: { c: ""} });
|
||||
t.insert({ x: 4, z: 3, k: { c: ""} });
|
||||
|
||||
t.ensureIndex({ z: 1, k: 1 });
|
||||
//t.ensureIndex({ z: 1, k: 1 }, { unique: true });
|
||||
//t.ensureIndex({ z: 1, k: 1 }, { dropDups: true, unique:true });
|
||||
|
||||
res = db.runCommand({ compact: 'compacttest', dev: true, paddingFactor: 1.2 });
|
||||
assert(res.ok);
|
||||
assert(t.count() > 13);
|
||||
var v = t.validate(true);
|
||||
assert(v.ok);
|
||||
|
||||
print("3");
|
||||
|
||||
// works on an empty collection?
|
||||
@ -44,4 +69,5 @@ assert(t.count() == 0);
|
||||
v = t.validate(true);
|
||||
assert(v.ok);
|
||||
assert(v.extentCount == 1);
|
||||
assert(t.getIndexes().length == 2);
|
||||
assert(t.getIndexes().length == 3);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user