Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NetworkedGraphicsMV3500
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Savage
NetworkedGraphicsMV3500
Commits
a7f68836
Commit
a7f68836
authored
5 years ago
by
Brutzman, Don
Browse files
Options
Downloads
Patches
Plain Diff
TODO sleep issues, inconsistent/varying test results
parent
8f8a5852
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/edu/nps/moves/dis7/AllPduRoundTripTest.java
+14
-4
14 additions, 4 deletions
test/edu/nps/moves/dis7/AllPduRoundTripTest.java
with
14 additions
and
4 deletions
test/edu/nps/moves/dis7/AllPduRoundTripTest.java
+
14
−
4
View file @
a7f68836
...
...
@@ -139,12 +139,18 @@ public class AllPduRoundTripTest
sendOne
(
fact
.
makeTspiPdu
());
sendOne
(
fact
.
makeUnderwaterAcousticPdu
());
sleep
(
1000L
);
assertTrue
(
pduReceivedMap
.
size
()
==
pduSentMap
.
size
(),
"No pdus, or not all sent pdus, received"
);
sleep
(
1000L
);
// go sender/receiver go! is this enough time to receive?
// TODO is there a more reliable way to determine whether receiver is complete?
shutDownReceiver
();
shutDownReceiver
();
// TODO hopefully this finishes reading the pending buffer before shutting down
shutDownRecorder
();
System
.
out
.
println
(
"pduReceivedMap.size()="
+
pduReceivedMap
.
size
()
+
", pduSentMap.size()="
+
pduSentMap
.
size
()
+
", match="
+
(
pduReceivedMap
.
size
()
==
pduSentMap
.
size
()));
assertTrue
(
pduReceivedMap
.
size
()
==
pduSentMap
.
size
(),
"No pdus, or not all sent pdus, received"
);
// TODO debugger fails??
testForEquals
();
...
...
@@ -207,6 +213,8 @@ public class AllPduRoundTripTest
assertEquals
(
pduSentMap
.
size
(),
pduReceivedMap
.
size
(),
"Different number of pdus received than sent"
);
pduSentMap
.
keySet
().
forEach
(
typ
->
assertTrue
(
pduSentMap
.
get
(
typ
).
equals
(
pduReceivedMap
.
get
(
typ
)),
"Sent and received pdus not identical"
));
// TODO is this sufficient? has each PDU value been compared as well?
}
private
void
getAllFromRecorder
(
Semaphore
sem
)
throws
Exception
...
...
@@ -233,6 +241,8 @@ public class AllPduRoundTripTest
assertEquals
(
pduSentMap
.
size
(),
pduReadMap
.
size
(),
"Different number of pdus sent than read"
);
pduSentMap
.
keySet
().
forEach
(
typ
->
assertTrue
(
pduSentMap
.
get
(
typ
).
equals
(
pduReadMap
.
get
(
typ
)),
"Sent and read pdus not identical"
));
// TODO is this sufficient? has each PDU value been compared as well?
}
//@formatter:off
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment