Skip to content
Snippets Groups Projects
Commit eb8c336f authored by Brutzman, Don's avatar Brutzman, Don
Browse files

Warning about assertion count failing if more than one pduLog/PduCapture*.dislog file is present

parent 6f1f81c6
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment