summaryrefslogtreecommitdiff
path: root/jstests/replsets/storage_commit_out_of_order.js
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@mongodb.com>2018-05-22 11:51:26 -0400
committerSpencer T Brody <spencer@mongodb.com>2018-05-22 11:51:26 -0400
commitabb1b353648260175c3dfe02ac8ae54c083956f7 (patch)
tree2a286341e6b80284a9e82ca7c53c6503efc3b5d1 /jstests/replsets/storage_commit_out_of_order.js
parent4cee07d8a97bb0663e7bfbc3f2e1fbf539140adf (diff)
downloadmongo-abb1b353648260175c3dfe02ac8ae54c083956f7.tar.gz
SERVER-35113 Fix storage_commit_out_of_order.js test to work with auth passthrough suites
Diffstat (limited to 'jstests/replsets/storage_commit_out_of_order.js')
-rw-r--r--jstests/replsets/storage_commit_out_of_order.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/jstests/replsets/storage_commit_out_of_order.js b/jstests/replsets/storage_commit_out_of_order.js
index d856d47cf7d..6d7147b49ce 100644
--- a/jstests/replsets/storage_commit_out_of_order.js
+++ b/jstests/replsets/storage_commit_out_of_order.js
@@ -24,7 +24,11 @@
/**
* Waits for the provided latch to reach 0 and then does a single w:majority insert.
*/
- const majorityInsert = function(num, host, dbName, collName, latch) {
+ const majorityInsert = function(testData, num, host, dbName, collName, latch) {
+ // Pass the TestData into the new thread so that the thread can inherit the auth
+ // credentials in the auth passthrough suites.
+ TestData = testData;
+
const m = new Mongo(host);
latch.countDown();
while (latch.getCount() > 0) {
@@ -53,7 +57,8 @@
const t = [];
const counter = new CountDownLatch(numThreads + 1);
for (let i = 0; i < numThreads; ++i) {
- t[i] = new ScopedThread(majorityInsert, i, coll.getMongo().host, dbName, collName, counter);
+ t[i] = new ScopedThread(
+ majorityInsert, TestData, i, coll.getMongo().host, dbName, collName, counter);
t[i].start();
}
@@ -71,4 +76,4 @@
}
rst.stopSet();
-}()); \ No newline at end of file
+}());