Skip to content

Commit

Permalink
ns
Browse files Browse the repository at this point in the history
  • Loading branch information
belaban committed Jul 12, 2024
1 parent 730a410 commit cf9569e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/junit-functional/org/jgroups/tests/BufferTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public class BufferTest {
@DataProvider
static Object[][] windowCreator() {
return new Object[][]{
//{new DynamicBuffer<>(0)},
{new FixedBuffer<>(0)}
{new DynamicBuffer<>(0)},
{new FixedBuffer<>(0)}
};
}

Expand Down Expand Up @@ -476,8 +476,13 @@ public void testAddAndRemove(Buffer<Message> buf) {
buf.add(5, msg(5, true), dont_loopback_filter, Options.DEFAULT());
buf.add(6, msg(6, true), dont_loopback_filter, Options.DEFAULT());
assert buf.highestDelivered() == 6;
for(int i=0; i <= 6; i++)
assert buf._get(i) == null;
if(buf instanceof FixedBuffer)
for(int i=1; i <= 6; i++)
assert buf._get(i) == null;
else {
assert IntStream.rangeClosed(1,2).boxed().allMatch(n -> buf._get(n) == null);
assert IntStream.rangeClosed(3,6).boxed().allMatch(n -> buf._get(n) != null);
}
}

public void testAddAndRemove2(Buffer<Message> buf) {
Expand Down

0 comments on commit cf9569e

Please sign in to comment.