File tree Expand file tree Collapse file tree 1 file changed +23
-23
lines changed
js/client/modules/@arangodb/testsuites Expand file tree Collapse file tree 1 file changed +23
-23
lines changed Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments