ijuma commented on a change in pull request #9520:
URL: https://github.com/apache/kafka/pull/9520#discussion_r553437304
##########
File path:
streams/src/test/java/org/apache/kafka/streams/processor/internals/ProcessorNodeTest.java
##########
@@ -49,18 +49,17 @@
public class ProcessorNodeTest {
@SuppressWarnings("unchecked")
- @Test(expected = StreamsException.class)
+ @Test
public void shouldThrowStreamsExceptionIfExceptionCaughtDuringInit() {
final ProcessorNode node = new ProcessorNode("name", new
ExceptionalProcessor(), Collections.emptySet());
- node.init(null);
+ assertThrows(StreamsException.class, () -> node.init(null));
}
@SuppressWarnings("unchecked")
- @Test(expected = StreamsException.class)
+ @Test
public void shouldThrowStreamsExceptionIfExceptionCaughtDuringClose() {
final ProcessorNode node = new ProcessorNode("name", new
ExceptionalProcessor(), Collections.emptySet());
- node.init(null);
- node.close();
Review comment:
I don't think this is necessarily the case. The failure during init can
happen after some resources have been allocated, right?
----------------------------------------------------------------
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:
[email protected]