Avoid random test failures due to milliseconds passing before date comparison