Skip to content

Commit

Permalink
chore: fix JRS tests failing because of PCES (#17508)
Browse files Browse the repository at this point in the history
Signed-off-by: Lazar Petrovic <lpetrovic05@gmail.com>
  • Loading branch information
lpetrovic05 authored Jan 23, 2025
1 parent 9701de2 commit 4da0822
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ private void findNext() throws IOException {
// This is possible (if not likely) when a node is shut down abruptly.
hasPartialEvent = true;
closeFile();
throw e;
} catch (final NullPointerException e) {
// The PlatformEvent constructor can throw this if the event is malformed.
hasPartialEvent = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,7 @@ void truncatedEventTest(@NonNull final AncientMode ancientMode, final boolean tr
final PcesFileIterator iterator = file.iterator(Long.MIN_VALUE);
final List<PlatformEvent> deserializedEvents = new ArrayList<>();

if (truncateOnBoundary) {
iterator.forEachRemaining(deserializedEvents::add);
} else {
assertThrows(
IOException.class,
() -> iterator.forEachRemaining(deserializedEvents::add),
"A partial event should have been detected and an IOException should have been thrown");
}
iterator.forEachRemaining(deserializedEvents::add);

assertEquals(truncateOnBoundary, !iterator.hasPartialEvent());

Expand Down Expand Up @@ -363,7 +356,7 @@ void corruptedEventsTest(@NonNull final AncientMode ancientMode) throws IOExcept
assertEquals(events.get(i), iterator.next());
}

assertThrows(IOException.class, iterator::next);
assertThrows(Exception.class, iterator::next);
}

@ParameterizedTest
Expand Down

0 comments on commit 4da0822

Please sign in to comment.