From 2b49358bea246d759b424096c70df1255a3140eb Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 8 Feb 2015 12:48:26 +1100 Subject: [PATCH] Fix EventBus unit test. --- .../net/md_5/bungee/event/EventPriorityTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/event/src/test/java/net/md_5/bungee/event/EventPriorityTest.java b/event/src/test/java/net/md_5/bungee/event/EventPriorityTest.java index e5338ecb..3881b732 100644 --- a/event/src/test/java/net/md_5/bungee/event/EventPriorityTest.java +++ b/event/src/test/java/net/md_5/bungee/event/EventPriorityTest.java @@ -8,7 +8,7 @@ public class EventPriorityTest { private final EventBus bus = new EventBus(); - private final CountDownLatch latch = new CountDownLatch( 5 ); + private final CountDownLatch latch = new CountDownLatch( 7); @Test public void testPriority() @@ -22,21 +22,21 @@ public class EventPriorityTest @EventHandler(priority = Byte.MIN_VALUE) public void onMinPriority(PriorityTestEvent event) { - Assert.assertEquals( 5, latch.getCount() ); + Assert.assertEquals( 7, latch.getCount() ); latch.countDown(); } @EventHandler(priority = EventPriority.LOWEST) public void onLowestPriority(PriorityTestEvent event) { - Assert.assertEquals( 4, latch.getCount() ); + Assert.assertEquals( 6, latch.getCount() ); latch.countDown(); } @EventHandler public void onNormalPriority(PriorityTestEvent event) { - Assert.assertEquals( 3, latch.getCount() ); + Assert.assertEquals( 4, latch.getCount() ); latch.countDown(); } @@ -64,14 +64,14 @@ public class EventPriorityTest @EventHandler(priority = EventPriority.HIGH) public void onHighPriority(PriorityTestEvent event) { - Assert.assertEquals( 2, latch.getCount() ); + Assert.assertEquals( 3, latch.getCount() ); latch.countDown(); } @EventHandler(priority = EventPriority.LOW) public void onLowPriority(PriorityTestEvent event) { - Assert.assertEquals( 4, latch.getCount() ); + Assert.assertEquals( 5, latch.getCount() ); latch.countDown(); } }