Skip to content

Commit

Permalink
DataStreamMap assertion in test
Browse files Browse the repository at this point in the history
  • Loading branch information
ivandika3 committed Dec 24, 2024
1 parent 13b8cdd commit 9f05a09
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ CompletableFuture<DataStream> computeIfAbsent(ClientInvocationId invocationId,

/** Similar to {@link java.util.Map#remove(java.lang.Object). */
CompletableFuture<DataStream> remove(ClientInvocationId invocationId);

/** Similar to {@link java.util.Map#size()}. */
int size();
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ public CompletableFuture<DataStream> computeIfAbsent(ClientInvocationId invocati
return map.computeIfAbsent(invocationId, newDataStream);
}

@Override
public int size() {
return map.size();
}

@Override
public String toString() {
return name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ void runTestDataStream(CLUSTER cluster, boolean stepDownLeader,
Assertions.assertFalse(s.getDataChannel().isOpen());
DataStreamTestUtils.assertLogEntry(impl, s);
}
Assertions.assertEquals(0, impl.getDataStreamMap().size());
}
}

Expand Down

0 comments on commit 9f05a09

Please sign in to comment.