XComp commented on a change in pull request #17857: URL: https://github.com/apache/flink/pull/17857#discussion_r755157198
########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPoolDestroyTest.java ########## @@ -119,8 +119,15 @@ public void testDestroyWhileBlockingRequest() throws Exception { */ public static boolean isInBlockingBufferRequest(StackTraceElement[] stackTrace) { if (stackTrace.length >= 8) { - return stackTrace[5].getMethodName().equals("get") - && stackTrace[7].getClassName().equals(LocalBufferPool.class.getName()); + for (int x = 0; x < stackTrace.length - 2; x++) { + if (stackTrace[x].getMethodName().equals("get") + && stackTrace[x + 2] + .getClassName() + .equals(LocalBufferPool.class.getName())) { + return true; + } + } + return false; Review comment: That return could be moved outside of the if block if its else branch is removed as well. ¯\_(ツ)_/¯ -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org