diff options
author | Spencer T Brody <spencer@mongodb.com> | 2018-05-22 11:51:26 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2018-05-22 11:51:26 -0400 |
commit | abb1b353648260175c3dfe02ac8ae54c083956f7 (patch) | |
tree | 2a286341e6b80284a9e82ca7c53c6503efc3b5d1 | |
parent | 4cee07d8a97bb0663e7bfbc3f2e1fbf539140adf (diff) | |
download | mongo-abb1b353648260175c3dfe02ac8ae54c083956f7.tar.gz |
SERVER-35113 Fix storage_commit_out_of_order.js test to work with auth passthrough suites
-rw-r--r-- | jstests/replsets/storage_commit_out_of_order.js | 11 |
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 +}()); |