(probably) fixed another concurrency problem in the tests

This commit is contained in:
Christian Basler 2015-10-19 15:14:25 +02:00
parent fb300c8731
commit a398b072b5

View File

@ -120,7 +120,7 @@ public class NetworkHandlerTest {
mock(NetworkHandler.MessageListener.class), mock(NetworkHandler.MessageListener.class),
10); 10);
t.join(); t.join();
assertEquals(3, nodeInventory.getInventory().size()); assertInventorySize(3, nodeInventory);
assertInventorySize(3, peerInventory); assertInventorySize(3, peerInventory);
} }
@ -137,7 +137,7 @@ public class NetworkHandlerTest {
mock(NetworkHandler.MessageListener.class), mock(NetworkHandler.MessageListener.class),
10); 10);
t.join(); t.join();
assertEquals(2, nodeInventory.getInventory().size()); assertInventorySize(2, nodeInventory);
assertInventorySize(2, peerInventory); assertInventorySize(2, peerInventory);
} }
@ -153,7 +153,7 @@ public class NetworkHandlerTest {
mock(NetworkHandler.MessageListener.class), mock(NetworkHandler.MessageListener.class),
10); 10);
t.join(); t.join();
assertEquals(1, nodeInventory.getInventory().size()); assertInventorySize(1, nodeInventory);
assertInventorySize(1, peerInventory); assertInventorySize(1, peerInventory);
} }