...
BugZero found this defect 2579 days ago.
The config_server_checks.js test runs rst.nodes[0].adminCommand( {replSetInitiate: conf} ); We expect this to cause a network exception due to the node removing itself, but if it does not we should check the result of the command and assert if it is not OK. Otherwise it will fail in expectState(rst, ReplSetTest.State.REMOVED); which makes it harder to see that the problem was that the initiate failed, not that the node didn't become REMOVED.
xgen-internal-githook commented on Sun, 5 Apr 2020 21:47:33 +0000: Author: {'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'} Message: SERVER-30739 config_server_checks.js should assert if initial replSetConfig fails (cherry picked from commit 3c97892206735c532cfeda0c0cb045c2b1f2758a) Branch: v3.6 https://github.com/mongodb/mongo/commit/e51b87a83be5f8f199eb4a25c4d94aec7055cd96 xgen-internal-githook commented on Fri, 3 Apr 2020 19:57:53 +0000: Author: {'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'} Message: SERVER-30739 config_server_checks.js should assert if initial replSetConfig fails Branch: v4.0 https://github.com/mongodb/mongo/commit/3c97892206735c532cfeda0c0cb045c2b1f2758a cramaechi commented on Sat, 30 Dec 2017 23:16:04 +0000: Hi Everyone, My proposed change would be to add the following line of code: assert.commandWorked(rst.nodes[0].adminCommand({replSetInitiate: conf})); immediately after the try-catch block but before expectState(rst, ReplSetTest.State.REMOVED). If everyone is in agreement, I will be more than happy to open a pull request. Please share your thoughts! Best Regards, Chibuikem Amaechi