0
0
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:
Geert Bosch 2019-05-04 13:58:06 -04:00
parent ba844b4e81
commit dd2ffef266

View File

@ -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;