A part of this test is to check if an inserted document can be successfully removed by findAndModify. Specifically, the deletion query checks if the current time $$NOW is greater than the insertion time.
In BF-32629, we observed that the deletion wasn't successful and hence failed the test. Given the low frequency of the BF, there are 2 possible causes:
- The insertion and the deletion happened under one millisecond.
- NTP adjusted the system clock and caused the clock going backward for a few milliseconds between the two commands.
Even though there's little we can prevent the test failure for the cause #2, we can improve the test to make it not subject to the cause #1 by changing $lt to $lte in the query of the deletion command. This change wouldn't deviate from the original goal of the test.