Skip to content

Commit 79d6084

Browse files
committed
Revert "Fix merge conflict: restore working noiseScript string template in hotBackup_el_cheapo"
This reverts commit b5eff91.
1 parent 1d2f66c commit 79d6084

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

js/client/modules/@arangodb/testsuites/hotbackup.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -555,29 +555,29 @@ function hotBackup_el_cheapo (options) {
555555

556556
let which = "hot_backup_el_cheapo";
557557
return hotBackup_load_backend(options, which, {
558-
noiseScript: `
559-
const errors = require('internal').errors;
560-
let collections = ${JSON.stringify(collections)};
561-
let i = 0;
562-
while (true) {
563-
try {
564-
let txn = db._createTransaction({collections: { write: collections}});
565-
collections.forEach(col => {
566-
let trx_col = txn.collection(col);
567-
trx_col.insert({"trd": idx, "i": i});
568-
});
569-
txn.commit();
570-
i += 1;
571-
} catch (ex) {
572-
if (ex.errorNum === errors.ERROR_SHUTTING_DOWN.code ||
573-
ex.errorNum === errors.ERROR_SIMPLE_CLIENT_COULD_NOT_CONNECT.code) {
574-
// todo: write i
575-
break;
576-
}
577-
}
578-
}
579-
580-
`,
558+
noiseScript: function () {
559+
const errors = require('internal').errors;
560+
let collections = args.collections;
561+
let i = 0;
562+
while (true) {
563+
try {
564+
let txn = db._createTransaction({collections: { write: collections}});
565+
collections.forEach(col => {
566+
let trx_col = txn.collection(col);
567+
trx_col.insert({"trd": idx, "i": i});
568+
});
569+
txn.commit();
570+
i += 1;
571+
} catch (ex) {
572+
if (ex.errorNum === errors.ERROR_SHUTTING_DOWN.code ||
573+
ex.errorNum === errors.ERROR_SIMPLE_CLIENT_COULD_NOT_CONNECT.code) {
574+
// todo: write i
575+
break;
576+
}
577+
}
578+
}
579+
return 0;
580+
},
581581
noiseVolume: 10,
582582
noiseDuration: 1,
583583
args: args,

0 commit comments

Comments
 (0)