[SERVER-9619] Test passes wrong argument to assert.soon Created: 08/May/13  Updated: 11/Jul/16  Resolved: 08/May/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.4.3
Fix Version/s: 2.5.0

Type: Bug Priority: Minor - P4
Reporter: Tad Marshall Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

jstests/sharding/mrShardedOutput.js passes a function and a timeout to assert.soon on lines 111 to 114.

    assert.soon(function(){
        return hasChunkOnShard("test.foo", shards[0]._id) && 
               hasChunkOnShard("test.foo", shards[1]._id);
    }, 2 * 60 * 1000);
 

This does not match the function signature for assert.soon:

assert.soon = function(f, msg, timeout /*ms*/, interval) {

The timeout will not be used, but will be displayed as the error message if the default 30 second timeout occurs.



 Comments   
Comment by auto [ 08/May/13 ]

Author:

{u'date': u'2013-05-08T14:40:03Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-9619 Pass correct arguments to assert.soon

Add an error message to the function call so that the timeout appears
at the correct location in the argument list.
Branch: master
https://github.com/mongodb/mongo/commit/1a4afe2906e385f0f4772a7f36ecb7fe5170cb1f

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