-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Testing Infrastructure
-
Fully Compatible
-
ALL
-
TIG 15 (06/03/16), TIG 16 (06/24/16)
-
0
Use _assertSoonNoExcept (from replsettest.js, or move it into assert.js) so that exceptions from broken connections don't break assert.soon blocks.
Example where the lack of exception handling broke the test when it could have recovered (due to an election occurring):
[js_test:balance_tags1] 2016-05-18T18:17:10.694+0000 2016-05-18T18:17:10.694+0000 E QUERY [thread1] Error: error doing query: failed: network error while attempting to run command 'replSetGetStatus' on host '127.0.0.1:20264' : [js_test:balance_tags1] 2016-05-18T18:17:10.694+0000 DB.prototype.runCommand@src/mongo/shell/db.js:135:1 [js_test:balance_tags1] 2016-05-18T18:17:10.694+0000 jsTest.authenticateNodes/<@src/mongo/shell/utils.js:254:19 [js_test:balance_tags1] 2016-05-18T18:17:10.694+0000 assert.soon@src/mongo/shell/assert.js:170:17 [js_test:balance_tags1] 2016-05-18T18:17:10.695+0000 jsTest.authenticateNodes@src/mongo/shell/utils.js:251:1