Skip to content

Commit

Permalink
(issue #29) adapting tie-break test to slow servers
Browse files Browse the repository at this point in the history
  • Loading branch information
bluestreak01 committed Jan 22, 2015
1 parent f9e3925 commit 15b5d58
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,12 @@ public void testTiebreakFailOver() throws Exception {
active2Latch.await(10, TimeUnit.SECONDS);
Assert.assertEquals("Node 2 is expected to become active", 0, active2Latch.getCount());

active1Latch.await(1, TimeUnit.SECONDS);
Assert.assertEquals("Node 1 active() callback should not have been called", 1, active1Latch.getCount());
// on slow servers controller 1 can go all the way to activation
// only to become standby after controller 2 comes online.
// however active1Latch becomes set irreversibly.

// active1Latch.await(1, TimeUnit.SECONDS);
// Assert.assertEquals("Node 1 active() callback should not have been called", 1, active1Latch.getCount());

standby1Latch.await(200, TimeUnit.MILLISECONDS);
Assert.assertEquals("Node 1 is expected to be on standby", 0, standby1Latch.getCount());
Expand Down

0 comments on commit 15b5d58

Please sign in to comment.