davidradl commented on code in PR #28106:
URL: https://github.com/apache/flink/pull/28106#discussion_r3187084981
##########
flink-runtime/src/test/java/org/apache/flink/runtime/asyncprocessing/operators/AbstractAsyncRunnableStreamOperatorTest.java:
##########
@@ -153,8 +153,8 @@ void testAsyncProcessWithKey() throws Exception {
new TestKeySelector(), ElementOrder.RECORD_ORDER);
AsyncOneInputStreamOperatorTestHarness<Tuple2<Integer, String>,
String> testHarness =
AsyncOneInputStreamOperatorTestHarness.create(testOperator,
128, 1, 0);
- testHarness.setStateBackend(buildAsyncStateBackend(new
HashMapStateBackend()));
- try {
+ try (testHarness) {
Review Comment:
why not construct the testHarness object in the try () seems to be the
recommended
[pattern](https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html)
--
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]