mirror of https://gitee.com/bigwinds/arangodb
added a test for rotate()
This commit is contained in:
parent
e294d1b8c4
commit
68c3b02ffb
|
@ -609,6 +609,37 @@ function CollectionSuite () {
|
||||||
db._drop(cn);
|
db._drop(cn);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief rotate
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
testRotate : function () {
|
||||||
|
var cn = "example";
|
||||||
|
|
||||||
|
db._drop(cn);
|
||||||
|
var c1 = db._create(cn);
|
||||||
|
|
||||||
|
c1.save({ _key: "test" });
|
||||||
|
var f = c1.figures();
|
||||||
|
assertEqual(0, f.datafiles.count);
|
||||||
|
|
||||||
|
if (c1.rotate) {
|
||||||
|
// rotate() is only present server-side...
|
||||||
|
c1.rotate();
|
||||||
|
|
||||||
|
f = c1.figures();
|
||||||
|
assertEqual(1, f.datafiles.count);
|
||||||
|
|
||||||
|
c1.rotate();
|
||||||
|
f = c1.figures();
|
||||||
|
assertEqual(2, f.datafiles.count);
|
||||||
|
}
|
||||||
|
|
||||||
|
c1.unload();
|
||||||
|
|
||||||
|
db._drop(cn);
|
||||||
|
},
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief figures
|
/// @brief figures
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in New Issue