[SERVER-13525] assert.repeat never throws an exception Created: 09/Apr/14  Updated: 05/Feb/16  Resolved: 16/Dec/15

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.3.0

Type: Bug Priority: Minor - P4
Reporter: Kamran K. Assignee: Jonathan Abrahams
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Minor Change
Operating System: ALL
Steps To Reproduce:

assert.repeat(function() {return false;});

Sprint: TIG E (01/08/16)
Participants:

 Description   

assert.repeat doesn't call doassert(), so it can never fail. The method is only used in one test:

jstests/noPassthroughWithMongod/sharding_balance3.js



 Comments   
Comment by Kamran K. [ 16/Dec/15 ]

I toggled "Backwards Compatibility" to "Minor Change" because some external scripts may have used assert.repeat.

Comment by Githook User [ 16/Dec/15 ]

Author:

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

Message: SERVER-13525 Remove assert.repeat(), since it never throws an exception and should not be used.
Branch: master
https://github.com/mongodb/mongo/commit/6799884bb12bb9af1b15e495cc50940f8d169f17

Comment by Kamran K. [ 15/Dec/15 ]

That sounds good to me. assert.repeat was used in more tests when I initially filed this.

Comment by Jonathan Abrahams [ 15/Dec/15 ]

It seems that assert.repeat is identical to assert.soon, except it's missing the doassert.. I vote to remove it instead of fixing it. kamran.khan Do you agree?

Generated at Thu Feb 08 03:32:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.