Repository: bookkeeper Updated Branches: refs/heads/master b30b527ba -> 9836c87dc
BOOKKEEPER-1020: Fix Explicit LAC tests on master Author: eolivelli <[email protected]> Reviewers: Sijie Guo <[email protected]>, Robert (Bobby) Evans <[email protected]> Closes #122 from eolivelli/BOOKKEEPER-1020-fix-explicitlac-test Project: http://git-wip-us.apache.org/repos/asf/bookkeeper/repo Commit: http://git-wip-us.apache.org/repos/asf/bookkeeper/commit/9836c87d Tree: http://git-wip-us.apache.org/repos/asf/bookkeeper/tree/9836c87d Diff: http://git-wip-us.apache.org/repos/asf/bookkeeper/diff/9836c87d Branch: refs/heads/master Commit: 9836c87dc2c082c46692d60c60cf9e23c7b0b06c Parents: b30b527 Author: eolivelli <[email protected]> Authored: Mon Apr 3 09:57:40 2017 -0700 Committer: Sijie Guo <[email protected]> Committed: Mon Apr 3 09:57:40 2017 -0700 ---------------------------------------------------------------------- .../test/java/org/apache/bookkeeper/client/BookKeeperTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/9836c87d/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTest.java ---------------------------------------------------------------------- diff --git a/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTest.java b/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTest.java index 3719556..0097028 100644 --- a/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTest.java +++ b/bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookKeeperTest.java @@ -374,8 +374,8 @@ public class BookKeeperTest extends BaseTestCase { public void testReadHandleWithExplicitLAC() throws Exception { ClientConfiguration confWithExplicitLAC = new ClientConfiguration() .setZkServers(zkUtil.getZooKeeperConnectString()); - int explictLacInterval = 1000; - confWithExplicitLAC.setExplictLacInterval(explictLacInterval); + int explicitLacIntervalMillis = 1000; + confWithExplicitLAC.setExplictLacInterval(explicitLacIntervalMillis); BookKeeper bkcWithExplicitLAC = new BookKeeper(confWithExplicitLAC); @@ -401,7 +401,7 @@ public class BookKeeperTest extends BaseTestCase { // lh.getExplicitLastAddConfirmed() will be < // lh.getPiggyBackedLastAddConfirmed(), // so it wont make explicit writelac in the first run - Thread.sleep((2 * explictLacInterval + 1) * 1000); + Thread.sleep((2 * explicitLacIntervalMillis/1000 + 1) * 1000); Assert.assertTrue( "Expected LAC of wlh: " + (2 * numOfEntries - 1) + " actual LAC of wlh: " + wlh.getLastAddConfirmed(), (wlh.getLastAddConfirmed() == (2 * numOfEntries - 1)));
