mcvsubbu commented on a change in pull request #4553: Refactor
ControllerLeaderLocator
URL: https://github.com/apache/incubator-pinot/pull/4553#discussion_r324931668
##########
File path:
pinot-core/src/test/java/org/apache/pinot/server/realtime/ControllerLeaderLocatorTest.java
##########
@@ -68,45 +69,48 @@ public void testInvalidateCachedControllerLeader() {
// Create Controller Leader Locator
FakeControllerLeaderLocator.create(helixManager);
- ControllerLeaderLocator controllerLeaderLocator =
FakeControllerLeaderLocator.getInstance();
+ FakeControllerLeaderLocator controllerLeaderLocator =
FakeControllerLeaderLocator.getInstance();
// check values at startup
-
Assert.assertTrue(controllerLeaderLocator.isCachedControllerLeaderInvalid());
+
Assert.assertFalse(controllerLeaderLocator.isCachedControllerLeaderValid());
Assert.assertEquals(controllerLeaderLocator.getLastCacheInvalidateMillis(), 0);
// very first invalidate
+ long currentTimeMs = System.currentTimeMillis();
Review comment:
Use fixed values for time. e.g. currentTimeMs = 100, and go from there.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]