divijvaidya commented on code in PR #12230: URL: https://github.com/apache/kafka/pull/12230#discussion_r903718578
########## clients/src/test/java/org/apache/kafka/common/KafkaFutureTest.java: ########## @@ -637,7 +637,12 @@ public void testLeakCompletableFuture() throws NoSuchMethodException, Invocation // Check the CF from a minimal CompletionStage doesn't cause completion of the original KafkaFuture Method minimal = CompletableFuture.class.getDeclaredMethod("minimalCompletionStage"); - CompletionStage<String> cs = (CompletionStage<String>) minimal.invoke(comfut); + CompletionStage<String> cs = null; + try { + cs = (CompletionStage<String>) minimal.invoke(comfut); + } catch (InvocationTargetException e) { + throw e.getCause(); + } Review Comment: Thanks for your suggestion. I have made the changes that you suggested in the latest commit. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org