ableegoldman commented on a change in pull request #9487: URL: https://github.com/apache/kafka/pull/9487#discussion_r523372464
########## File path: streams/src/test/java/org/apache/kafka/streams/processor/internals/StreamThreadTest.java ########## @@ -1000,7 +1012,17 @@ public void restore(final Map<TaskId, Task> tasks) { CLIENT_ID, new LogContext(""), new AtomicInteger(), - new AtomicLong(Long.MAX_VALUE) + new AtomicLong(Long.MAX_VALUE), + null, + e -> { + if (e instanceof RuntimeException) { + throw (RuntimeException) e; + } else if (e instanceof Error) { + throw (Error) e; + } else { + throw new RuntimeException("Unexpected checked exception caught in the uncaught exception handler", e); + } Review comment: Ah ok so there's some other IllegalStateException that would get swallowed if we just used `e -> {}` like in the other tests, so we need to explicitly rethrow it? That seems fine, although it makes me think that we should go ahead and use a "real" handler in _all_ of the tests, not just this one. Otherwise there could be some bug which causes an unexpected exception, but the test would just swallow it and silently pass. Can we just use the default handler wrapper for all of these tests so they reflect realistic scenarios? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org