mirror of https://gitee.com/bigwinds/arangodb
jshund
This commit is contained in:
parent
36a67ccf32
commit
0a230b77e3
|
@ -1049,7 +1049,8 @@ ArangoCollection.prototype.last = function (count) {
|
|||
/// save(<from>, <to>, <data>, <waitForSync>)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ArangoCollection.prototype.save = function (from, to, data, waitForSync) {
|
||||
ArangoCollection.prototype.save =
|
||||
ArangoCollection.prototype.insert = function (from, to, data, waitForSync) {
|
||||
var type = this.type(), url;
|
||||
|
||||
if (type === undefined) {
|
||||
|
|
|
@ -1048,7 +1048,8 @@ ArangoCollection.prototype.last = function (count) {
|
|||
/// save(<from>, <to>, <data>, <waitForSync>)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ArangoCollection.prototype.save = function (from, to, data, waitForSync) {
|
||||
ArangoCollection.prototype.save =
|
||||
ArangoCollection.prototype.insert = function (from, to, data, waitForSync) {
|
||||
var type = this.type(), url;
|
||||
|
||||
if (type === undefined) {
|
||||
|
|
|
@ -8,7 +8,7 @@ function runSetup () {
|
|||
internal.debugClearFailAt();
|
||||
|
||||
db._drop("UnitTestsRecovery");
|
||||
var c = db._create("UnitTestsRecovery");
|
||||
db._create("UnitTestsRecovery");
|
||||
|
||||
db._executeTransaction({
|
||||
collections: {
|
||||
|
|
|
@ -7,7 +7,7 @@ var jsunity = require("jsunity");
|
|||
function runSetup () {
|
||||
internal.debugClearFailAt();
|
||||
|
||||
var i, j, c;
|
||||
var c;
|
||||
db._drop("footest");
|
||||
c = db._create("footest", { id: 99999999 });
|
||||
c.save({ foo: "bar" });
|
||||
|
|
|
@ -8,8 +8,8 @@ function runSetup () {
|
|||
internal.debugClearFailAt();
|
||||
|
||||
db._drop("UnitTestsRecovery");
|
||||
var c = db._create("UnitTestsRecovery");
|
||||
|
||||
db._create("UnitTestsRecovery");
|
||||
|
||||
internal.debugSetFailAt("CreateJournalDocumentCollection");
|
||||
|
||||
db._executeTransaction({
|
||||
|
|
|
@ -49,7 +49,7 @@ function recoverySuite () {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testDropIndexes : function () {
|
||||
var i, j, c, idx;
|
||||
var i, c, idx;
|
||||
|
||||
for (i = 0; i < 4; ++i) {
|
||||
c = db._collection("UnitTestsRecovery" + i);
|
||||
|
|
|
@ -39,7 +39,7 @@ function recoverySuite () {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testIndexesBitarray : function () {
|
||||
var c = db._collection("UnitTestsRecovery"), i;
|
||||
var c = db._collection("UnitTestsRecovery");
|
||||
var idx = c.getIndexes()[1];
|
||||
assertEqual("bitarray", idx.type);
|
||||
assertFalse(idx.unique);
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
|
||||
var db = require("org/arangodb").db;
|
||||
var internal = require("internal");
|
||||
var simple = require("org/arangodb/simple-query");
|
||||
var jsunity = require("jsunity");
|
||||
|
||||
function runSetup () {
|
||||
internal.debugClearFailAt();
|
||||
|
||||
db._drop("UnitTestsRecovery1");
|
||||
var c = db._create("UnitTestsRecovery1"), i, j;
|
||||
var c = db._create("UnitTestsRecovery1"), i;
|
||||
c.ensureHashIndex("value");
|
||||
|
||||
for (i = 0; i < 1000; ++i) {
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
|
||||
var db = require("org/arangodb").db;
|
||||
var internal = require("internal");
|
||||
var simple = require("org/arangodb/simple-query");
|
||||
var jsunity = require("jsunity");
|
||||
|
||||
function runSetup () {
|
||||
internal.debugClearFailAt();
|
||||
|
||||
db._drop("UnitTestsRecovery1");
|
||||
var c = db._create("UnitTestsRecovery1"), i, j;
|
||||
var c = db._create("UnitTestsRecovery1"), i;
|
||||
c.ensureSkiplist("value");
|
||||
|
||||
for (i = 0; i < 1000; ++i) {
|
||||
|
|
|
@ -8,7 +8,7 @@ function runSetup () {
|
|||
internal.debugClearFailAt();
|
||||
|
||||
db._drop("UnitTestsRecovery");
|
||||
var c = db._create("UnitTestsRecovery");
|
||||
db._create("UnitTestsRecovery");
|
||||
|
||||
db._executeTransaction({
|
||||
collections: {
|
||||
|
|
|
@ -8,7 +8,7 @@ function runSetup () {
|
|||
internal.debugClearFailAt();
|
||||
|
||||
db._drop("UnitTestsRecovery");
|
||||
var c = db._create("UnitTestsRecovery");
|
||||
db._create("UnitTestsRecovery");
|
||||
|
||||
db._executeTransaction({
|
||||
collections: {
|
||||
|
|
|
@ -37,7 +37,7 @@ function recoverySuite () {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testManyUpdates : function () {
|
||||
var i, c = db._collection("UnitTestsRecovery");
|
||||
var c = db._collection("UnitTestsRecovery");
|
||||
|
||||
assertEqual(2, c.count());
|
||||
assertEqual(199999, c.document("value").value);
|
||||
|
|
|
@ -18,8 +18,8 @@ function runSetup () {
|
|||
}
|
||||
db._createDatabase(d);
|
||||
db._useDatabase(d);
|
||||
|
||||
var c = db._create("UnitTestsRecovery");
|
||||
|
||||
db._create("UnitTestsRecovery");
|
||||
|
||||
db._executeTransaction({
|
||||
collections: {
|
||||
|
|
|
@ -8,8 +8,8 @@ function runSetup () {
|
|||
internal.debugClearFailAt();
|
||||
|
||||
db._drop("UnitTestsRecovery");
|
||||
var c = db._create("UnitTestsRecovery"), i;
|
||||
|
||||
db._create("UnitTestsRecovery");
|
||||
|
||||
internal.debugSetFailAt("LogfileManagerWriteShutdown");
|
||||
|
||||
db._executeTransaction({
|
||||
|
|
|
@ -9,8 +9,8 @@ function runSetup () {
|
|||
|
||||
db._drop("UnitTestsRecovery1");
|
||||
db._drop("UnitTestsRecovery2");
|
||||
var c1 = db._create("UnitTestsRecovery1");
|
||||
var c2 = db._create("UnitTestsRecovery2");
|
||||
db._create("UnitTestsRecovery1");
|
||||
db._create("UnitTestsRecovery2");
|
||||
|
||||
db._executeTransaction({
|
||||
collections: {
|
||||
|
|
|
@ -8,7 +8,7 @@ function runSetup () {
|
|||
internal.debugClearFailAt();
|
||||
|
||||
db._drop("UnitTestsRecovery");
|
||||
var c = db._create("UnitTestsRecovery");
|
||||
db._create("UnitTestsRecovery");
|
||||
|
||||
db._executeTransaction({
|
||||
collections: {
|
||||
|
|
|
@ -8,7 +8,7 @@ function runSetup () {
|
|||
internal.debugClearFailAt();
|
||||
|
||||
db._drop("UnitTestsRecovery");
|
||||
var c = db._create("UnitTestsRecovery");
|
||||
db._create("UnitTestsRecovery");
|
||||
|
||||
try {
|
||||
db._executeTransaction({
|
||||
|
|
|
@ -8,7 +8,7 @@ function runSetup () {
|
|||
internal.debugClearFailAt();
|
||||
|
||||
db._drop("UnitTestsRecovery");
|
||||
var c = db._create("UnitTestsRecovery");
|
||||
db._create("UnitTestsRecovery");
|
||||
|
||||
try {
|
||||
db._executeTransaction({
|
||||
|
|
|
@ -8,7 +8,7 @@ function runSetup () {
|
|||
internal.debugClearFailAt();
|
||||
|
||||
db._drop("UnitTestsRecovery");
|
||||
var c = db._create("UnitTestsRecovery"), i;
|
||||
var c = db._create("UnitTestsRecovery");
|
||||
|
||||
c.save({ _key: "crashme", thefoxx: "is quick and jumped over the lazy dog" }, true); // wait for sync
|
||||
|
||||
|
|
Loading…
Reference in New Issue