diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2018-11-28 17:24:58 -0500 |
---|---|---|
committer | Jack Mulrow <jack.mulrow@mongodb.com> | 2018-12-16 21:34:14 -0500 |
commit | 53d8b294b81f70ec183f5d95be6440ecc5f8a728 (patch) | |
tree | 01ead1c3bffea2bcd57be3e0d6c681f953ec7323 /jstests/concurrency/fsm_libs | |
parent | 2d94c21d3af7d4b4fc32e6c34791ac24a2a35c0a (diff) | |
download | mongo-53d8b294b81f70ec183f5d95be6440ecc5f8a728.tar.gz |
SERVER-38026 Run concurrency_replication_multi_stmt_txn.yml against sharded collections
Diffstat (limited to 'jstests/concurrency/fsm_libs')
-rw-r--r-- | jstests/concurrency/fsm_libs/fsm.js | 4 | ||||
-rw-r--r-- | jstests/concurrency/fsm_libs/resmoke_runner.js | 7 | ||||
-rw-r--r-- | jstests/concurrency/fsm_libs/worker_thread.js | 17 |
3 files changed, 14 insertions, 14 deletions
diff --git a/jstests/concurrency/fsm_libs/fsm.js b/jstests/concurrency/fsm_libs/fsm.js index fe873373846..acfc869dd2d 100644 --- a/jstests/concurrency/fsm_libs/fsm.js +++ b/jstests/concurrency/fsm_libs/fsm.js @@ -104,7 +104,9 @@ var fsm = (function() { v = deepCopyObject([], v); } } - dst[k] = v; + var desc = Object.getOwnPropertyDescriptor(src, k); + desc.value = v; + Object.defineProperty(dst, k, desc); } return dst; } diff --git a/jstests/concurrency/fsm_libs/resmoke_runner.js b/jstests/concurrency/fsm_libs/resmoke_runner.js index f915c554076..4af4555cb82 100644 --- a/jstests/concurrency/fsm_libs/resmoke_runner.js +++ b/jstests/concurrency/fsm_libs/resmoke_runner.js @@ -105,6 +105,13 @@ cluster.awaitReplication(); } + // Synchronize the cluster times across all routers if the tests will be overriden to + // use transactions, so the earliest global snapshots chosen by each router will include + // the effects of each setup function. + if (cluster.isSharded() && TestData.runInsideTransaction) { + cluster.synchronizeMongosClusterTimes(); + } + // After the $config.setup() function has been called, it is safe for the stepdown // thread to start running. The main thread won't attempt to interact with the cluster // until all of the spawned worker threads have finished. diff --git a/jstests/concurrency/fsm_libs/worker_thread.js b/jstests/concurrency/fsm_libs/worker_thread.js index 2ac6588f8ec..427d287571f 100644 --- a/jstests/concurrency/fsm_libs/worker_thread.js +++ b/jstests/concurrency/fsm_libs/worker_thread.js @@ -178,20 +178,11 @@ var workerThread = (function() { // Object.extend() defines all properties added to the destination object as // configurable, enumerable, and writable. To prevent workloads from changing // the iterations and threadCount properties in their state functions, we redefine - // them here as non-configurable, non-enumerable, and non-writable. + // them here as non-configurable and non-writable. Object.defineProperties(data, { - 'iterations': { - configurable: false, - enumerable: false, - writable: false, - value: data.iterations - }, - 'threadCount': { - configurable: false, - enumerable: false, - writable: false, - value: data.threadCount - } + 'iterations': {configurable: false, writable: false, value: data.iterations}, + 'threadCount': + {configurable: false, writable: false, value: data.threadCount} }); data.tid = args.tid; |