From fb3fee341455ce24fe276aafe3dea58f2a834037 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Wed, 29 Nov 2017 20:43:54 -0800 Subject: [PATCH] HBASE-19383 [1.2] java.lang.AssertionError: expected:<2> but was:<1> at org.apache.hadoop.hbase.TestChoreService.testTriggerNowFailsWhenNotScheduled(TestChoreService.java:707) --- .../apache/hadoop/hbase/TestChoreService.java | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java index abca0d74253..aea689f1154 100644 --- a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java +++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java @@ -688,35 +688,6 @@ public class TestChoreService { } } - @Test (timeout=20000) - public void testTriggerNowFailsWhenNotScheduled() throws InterruptedException { - final int period = 100; - // Small sleep time buffer to allow CountingChore to complete - final int sleep = 5; - ChoreService service = new ChoreService("testTriggerNowFailsWhenNotScheduled"); - CountingChore chore = new CountingChore("dn", period); - - try { - assertFalse(chore.triggerNow()); - assertTrue(chore.getCountOfChoreCalls() == 0); - - service.scheduleChore(chore); - Thread.sleep(sleep); - assertEquals(1, chore.getCountOfChoreCalls()); - Thread.sleep(period); - assertEquals(2, chore.getCountOfChoreCalls()); - assertTrue(chore.triggerNow()); - Thread.sleep(sleep); - assertTrue(chore.triggerNow()); - Thread.sleep(sleep); - assertTrue(chore.triggerNow()); - Thread.sleep(sleep); - assertEquals(5, chore.getCountOfChoreCalls()); - } finally { - shutdownService(service); - } - } - @Test (timeout=20000) public void testStopperForScheduledChores() throws InterruptedException { ChoreService service = new ChoreService("testStopperForScheduledChores");