mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
SERVER-41013 Make lock_stats.js test more resilient against unset stats
This commit is contained in:
parent
ba844b4e81
commit
dd2ffef266
@ -20,6 +20,8 @@
|
||||
var stats = db.serverStatus().locks.Global;
|
||||
if (!stats.acquireWaitCount || !stats.acquireWaitCount.W)
|
||||
return false;
|
||||
if (!stats.timeAcquiringMicros || !stats.timeAcquiringMicros.W)
|
||||
return false;
|
||||
if (!startStats.acquireWaitCount || !startStats.acquireWaitCount.W)
|
||||
return true;
|
||||
return stats.acquireWaitCount.W > startStats.acquireWaitCount.W;
|
||||
|
Loading…
Reference in New Issue
Block a user