[SERVER-24201] jsTest.authenticateNodes doesn't handle temp network errors Created: 18/May/16  Updated: 20/Nov/16  Resolved: 14/Jun/16

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.2.8, 3.3.9

Type: Bug Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Jonathan Abrahams
Resolution: Done Votes: 0
Labels: test-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: TIG 15 (06/03/16), TIG 16 (06/24/16)
Participants:
Linked BF Score: 0

 Description   

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



 Comments   
Comment by Githook User [ 21/Jun/16 ]

Author:

{u'username': u'hptabster', u'name': u'Jonathan Abrahams', u'email': u'jonathan@mongodb.com'}

Message: SERVER-24201 jsTest.authenticateNodes doesn't handle temp network errors
Branch: v3.2
https://github.com/mongodb/mongo/commit/56bbe6c5ef73b626b0bf3ed85dd128f03702a62c

Comment by Githook User [ 14/Jun/16 ]

Author:

{u'username': u'hptabster', u'name': u'Jonathan Abrahams', u'email': u'jonathan@mongodb.com'}

Message: SERVER-24201 jsTest.authenticateNodes doesn't handle temp network errors
Branch: master
https://github.com/mongodb/mongo/commit/f8402adbcdf00c0bb42f83c4818e22c3c990813f

Comment by Kamran K. [ 20/May/16 ]

jonathan.abrahams, can you look into the suggested implementation? I don't know at which level the exception should be handled.

Generated at Thu Feb 08 04:05:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.