Skip to content

Commit

Permalink
SERVER-14946: assert.soon don't print code if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
kangas committed Aug 20, 2014
1 parent f649054 commit 09a639c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/mongo/shell/assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ assert.soon = function(f, msg, timeout /*ms*/, interval) {
}

diff = (new Date()).getTime() - start.getTime();
if (diff > timeout)
doassert("assert.soon failed: " + f + ", msg:" + msg);
if (diff > timeout) {
doassert(msg ? "assert.soon failed, msg:" + msg :
"assert.soon failed: " + f);
}
sleep(interval);
}
}
Expand Down

0 comments on commit 09a639c

Please sign in to comment.