QueryTests: Change the default clock step to 1 second

This should match NoteDb, since NoteDb timestamp resolution is 1 second.
This should fix intermittent AbstractQueryChangesTest#hasEdit test
failures caused by wrong returned change order.

Change index implementations are required to return changes in
descending order of last updated timestamp, and the tests are correct
to be testing that.

Inspired-By: Dave Borowitz <dborowitz@google.com>
Change-Id: I17e6d74fe85f1b2001757371b2cb576ba2b7eae7
This commit is contained in:
David Ostrovsky
2016-12-16 19:37:10 +01:00
committed by David Ostrovsky
parent dd44680231
commit 5cc5555e2e

View File

@@ -204,7 +204,7 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
@Before
public void setTimeForTesting() {
resetTimeWithClockStep(1, MILLISECONDS);
resetTimeWithClockStep(1, SECONDS);
}
private void resetTimeWithClockStep(long clockStep, TimeUnit clockStepUnit) {