From 9af05edce174bd549397357b032e649660037ac7 Mon Sep 17 00:00:00 2001 From: Don Brutzman <brutzman@nps.edu> Date: Tue, 1 Sep 2020 17:40:06 -0700 Subject: [PATCH] renames and comments for clarity --- test/edu/nps/moves/dis7/CommentPdusTest.java | 3 +-- test/edu/nps/moves/dis7/PduTest.java | 10 ++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test/edu/nps/moves/dis7/CommentPdusTest.java b/test/edu/nps/moves/dis7/CommentPdusTest.java index 0e1161c0d4..c347f6a89d 100644 --- a/test/edu/nps/moves/dis7/CommentPdusTest.java +++ b/test/edu/nps/moves/dis7/CommentPdusTest.java @@ -5,7 +5,6 @@ package edu.nps.moves.dis7; import edu.nps.moves.dis7.enumerations.VariableRecordType; -import edu.nps.moves.dis7.pdus.CommentPdu; import edu.nps.moves.dis7.pdus.Pdu; import edu.nps.moves.dis7.utilities.DisThreadedNetworkInterface; import edu.nps.moves.dis7.utilities.PduFactory; @@ -74,7 +73,7 @@ public class CommentPdusTest * @param newPdu PDU of interest */ private void testOne(Pdu newPdu) { - sendPdu(newPdu); // will wait a while + sendPdu(newPdu); // send to self, then wait a while, then return receivedPdu assertTrue(receivedPdu != null, "No response from network receiver"); String marshallMismatchMessage = diff --git a/test/edu/nps/moves/dis7/PduTest.java b/test/edu/nps/moves/dis7/PduTest.java index e4e87d37df..493298a519 100644 --- a/test/edu/nps/moves/dis7/PduTest.java +++ b/test/edu/nps/moves/dis7/PduTest.java @@ -94,10 +94,12 @@ abstract public class PduTest } /** - * Handler + * Handler that passes PDU to DIS network interface for marshalling (serialization), + * which then sends IEEE Standard (binary) PDU to self, which is then read separately + * for unmarshalling (deserialization) further unit testing. * @param createdPdu new PDU of interest */ - protected void sendPdu(Pdu createdPdu) + protected void sendIeeeStandardPdu(Pdu createdPdu) { try { @@ -106,7 +108,7 @@ abstract public class PduTest } catch (InterruptedException ex) { - System.err.println(this.getClass().getName() + ".sendPdu(Pdu createdPdu), error sending Multicast: " + ex.getLocalizedMessage()); + System.err.println(this.getClass().getName() + ".sendIeeeStandardPdu(Pdu createdPdu), error sending Multicast: " + ex.getLocalizedMessage()); System.exit(1); } } @@ -140,7 +142,7 @@ abstract public class PduTest { String TEST_SUITE_WARNING = " (TODO note that test works standalone but mysteriously fails as part of project test suite)"; - sendPdu(createdPdu); // will wait a while, then return receivedPdu + sendIeeeStandardPdu(createdPdu); // send to self, then wait a while, then return receivedPdu assertTrue(receivedPdu != null, "No response from network receive after " + getThreadSleepInterval() + " msec" + TEST_SUITE_WARNING); -- GitLab