diff --git a/test/edu/nps/moves/dis7/AllPduRoundTripTest.java b/test/edu/nps/moves/dis7/AllPduRoundTripTest.java index a4e34f37fc8b0b6a9ee47c40d6e5dd7e038d8d77..f28f9b93414763ceedae683ad06617b4abe0b353 100644 --- a/test/edu/nps/moves/dis7/AllPduRoundTripTest.java +++ b/test/edu/nps/moves/dis7/AllPduRoundTripTest.java @@ -205,10 +205,13 @@ public class AllPduRoundTripTest private void testForEquals() throws Exception { + // TODO set sender and receiver to single file + System.out.println("*** Warning: ensure no prior dislog files are present in pduLog directory or assertion count of replay will fail."); + assertEquals(pdusSent.size(), pdusReceived.size(), "Different number of pdus received than sent"); - assertIterableEquals(pdusSent, pdusReceived, "Sent and received pdus not identical"); - // TODO is this sufficient? has each PDU value been compared as well? + // TODO is this sufficient? has each PDU value been fully compared as well? + assertIterableEquals(pdusSent, pdusReceived, "Sent and received pdus not identical"); } private void getAllFromRecorder(Semaphore sem) throws Exception @@ -228,13 +231,14 @@ public class AllPduRoundTripTest }); } - private void testRecorderForEquals() throws Exception - { - assertEquals(pdusSent.size(), pdusRead.size(), "Different number of pdus sent than read"); - assertIterableEquals(pdusSent, pdusRead, "Sent and read pdus not identical"); - - // TODO is this sufficient? has each PDU value been compared as well? - } + private void testRecorderForEquals() throws Exception + { + // TODO this will fail if prior dislog files are present in pduLog directory, ignore them to make it less brittle + assertEquals(pdusSent.size(), pdusRead.size(), "Different number of pdus sent than read"); + assertIterableEquals(pdusSent, pdusRead, "Sent and read pdus not identical"); + + // TODO is this sufficient? has each PDU value been compared as well? + } private static void sleep(long ms) { try { @@ -244,8 +248,8 @@ public class AllPduRoundTripTest } } - public static void main(String[] args) - { - new AllPduRoundTripTest().testRoundTripAllPdus(); - } + public static void main(String[] args) + { + new AllPduRoundTripTest().testRoundTripAllPdus(); + } }