emiliosetiadarma commented on code in PR #6272:
URL: https://github.com/apache/nifi/pull/6272#discussion_r939455126
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenRELP.java:
##########
@@ -91,18 +92,26 @@ public class TestListenRELP {
@Mock
private RestrictedSSLContextService sslContextService;
+ private AutoCloseable closeable;
+
private RELPEncoder encoder;
private TestRunner runner;
- @Before
+ @BeforeEach
public void setup() {
encoder = new RELPEncoder(CHARSET);
ListenRELP mockRELP = new MockListenRELP();
runner = TestRunners.newTestRunner(mockRELP);
+ closeable = MockitoAnnotations.openMocks(this);
Review Comment:
Making the changes
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestListenRELP.java:
##########
@@ -91,18 +92,26 @@ public class TestListenRELP {
@Mock
private RestrictedSSLContextService sslContextService;
+ private AutoCloseable closeable;
+
private RELPEncoder encoder;
private TestRunner runner;
- @Before
+ @BeforeEach
public void setup() {
encoder = new RELPEncoder(CHARSET);
ListenRELP mockRELP = new MockListenRELP();
runner = TestRunners.newTestRunner(mockRELP);
+ closeable = MockitoAnnotations.openMocks(this);
+ }
+
+ @AfterEach
+ public void cleanup() throws Exception {
+ closeable.close();
}
Review Comment:
Removing it
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]