]
Richard Achmatowicz commented on JGRP-1795:
-------------------------------------------
The problem with the error message (which is only thrown if the assert is triggered) can
be corrected this way:
{noformat}
private static void check(final int num_expected_msgs, Collection<Integer>...
lists) {
for(Collection<Integer> list: lists) {
System.out.println("list: " + list);
}
for(Collection<Integer> list: lists) {
Collection<Integer> missing=new TreeSet<Integer>();
if(list.size() != num_expected_msgs) {
for(int i=1; i <= num_expected_msgs; i++) // this line changed
missing.add(i);
missing.removeAll(list);
assert list.size() == num_expected_msgs : "expected " +
num_expected_msgs + " elements, but got " +
list.size() + " (list=" + list + "), missing="
+ missing;
}
}
}
{noformat}
You are receiving integers [1,..,20] and creating the missing list from [0,..,19].
OOBTest testRandomRegularAndOOBMulticasts fails to receive all
messages
-----------------------------------------------------------------------
Key: JGRP-1795
URL:
https://issues.jboss.org/browse/JGRP-1795
Project: JGroups
Issue Type: Bug
Affects Versions: 3.2.13
Environment: RHEL(3/24), WIN (1/6), Solaris (6/24) where (x/y) means x failures
over y test executions.
Reporter: Richard Achmatowicz
Assignee: Bela Ban
Fix For: 3.2.13
This test does the following with two channels a and b:
- adds a DISCARD layer to a to disccard 50% of down messages
- sends 20 messages to the group, randomly using a and b as senders, and randomly
choosing OOB or non-OOB
- wait 10 seconds for 20 messages to be received by each of a and b
- print out the messages received
- remove the DISCARD layer from a
- wait 2.5 seconds for further messages to arrive
- assert that 20 messages have arrived for each channel a and b
The test fails on the assertion, with results such as:
{noformat}
expected 20 elements, but got 19 (list=[1, 4, 3, 8, 6, 7, 10, 13, 15, 20, 2, 5, 9, 12,
14, 16, 17, 18, 19]), missing=[0, 11]
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: