diff options
author | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2017-11-08 19:00:40 -0500 |
---|---|---|
committer | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2018-09-11 14:40:46 -0400 |
commit | ec5ca87650b4e4663b182aa736c523bc585865ec (patch) | |
tree | e462c5f8dcf3fcdb165c1824edd53d6e62655c9a /jstests | |
parent | e013b606016ead1c82ed7c09cbe3c558d5aaa3b2 (diff) | |
download | mongo-ec5ca87650b4e4663b182aa736c523bc585865ec.tar.gz |
SERVER-28251 Fix race condition in index_killop.js
(cherry picked from commit 6a416de4330d6368ea77bace41e297082e8cf3bd)
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/noPassthrough/index_killop.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/noPassthrough/index_killop.js b/jstests/noPassthrough/index_killop.js index 734053ce06a..42a5270a28a 100644 --- a/jstests/noPassthrough/index_killop.js +++ b/jstests/noPassthrough/index_killop.js @@ -47,9 +47,6 @@ // Kill the index build. assert.commandWorked(testDB.killOp(opId)); - assert.commandWorked( - testDB.adminCommand({configureFailPoint: 'hangAfterStartingIndexBuild', mode: 'off'})); - // Wait for the index build to stop. assert.soon(function() { return getIndexBuildOpId() == -1; @@ -62,6 +59,9 @@ // Check that no new index has been created. This verifies that the index build was aborted // rather than successfully completed. assert.eq([{_id: 1}], testDB.test.getIndexKeys()); + + assert.commandWorked( + testDB.adminCommand({configureFailPoint: 'hangAfterStartingIndexBuild', mode: 'off'})); } testAbortIndexBuild({background: true}); |