diff options
author | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2018-09-11 12:57:46 -0400 |
---|---|---|
committer | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2018-09-11 12:57:46 -0400 |
commit | f45a68e589850bbf43c9d656bbbffa0d6b1efc79 (patch) | |
tree | f0211f2c88ecda3830fd1f38d06cd4f4dd0f18de /jstests/concurrency | |
parent | 4048b93525f050bdffb8fd4bc3dcdbd9139d1e3c (diff) | |
download | mongo-f45a68e589850bbf43c9d656bbbffa0d6b1efc79.tar.gz |
SERVER-35160 Allow TestData to be undefined in worker_thread.js again.
The global TestData object is `undefined` when the backup_restore*.js
tests run FSM workloads against their own replica set.
This partially reverts some of the changes to worker_thread.js from
fdf3ac3da53134ffac8f3d51a8faa49479daec44.
Diffstat (limited to 'jstests/concurrency')
-rw-r--r-- | jstests/concurrency/fsm_libs/worker_thread.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/jstests/concurrency/fsm_libs/worker_thread.js b/jstests/concurrency/fsm_libs/worker_thread.js index 8f331f362f0..2ac6588f8ec 100644 --- a/jstests/concurrency/fsm_libs/worker_thread.js +++ b/jstests/concurrency/fsm_libs/worker_thread.js @@ -31,6 +31,11 @@ var workerThread = (function() { globalAssertLevel = args.globalAssertLevel; + // The global 'TestData' object may still be undefined if the concurrency suite isn't being + // run by resmoke.py (e.g. if it is being run via a parallel shell in the backup/restore + // tests). + TestData = (TestData !== undefined) ? TestData : {}; + try { if (typeof db !== 'undefined') { // The implicit database connection created within the thread's scope @@ -132,8 +137,8 @@ var workerThread = (function() { logRetryAttempts: true, overrideRetryAttempts: 3 }; + Object.assign(TestData, newOptions); - TestData = Object.merge(TestData, newOptions); load('jstests/libs/override_methods/auto_retry_on_network_error.js'); } @@ -142,7 +147,7 @@ var workerThread = (function() { // that database while we're waiting for a majority of nodes in the replica set to // confirm it has been dropped. We load the // implicitly_retry_on_database_drop_pending.js file to make it so that the clients - // started by these concurrency framework automatically retry their operation in the + // started by the concurrency framework automatically retry their operation in the // face of this particular error response. load('jstests/libs/override_methods/implicitly_retry_on_database_drop_pending.js'); } |