chia7712 commented on a change in pull request #9520:
URL: https://github.com/apache/kafka/pull/9520#discussion_r553394406
##########
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:
It fails to init so the close is unnecessary.
----------------------------------------------------------------
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]