LuciferYang commented on code in PR #13147: URL: https://github.com/apache/gluten/pull/13147#discussion_r4140740921
########## gluten-core/src/test/java/org/apache/gluten/memory/memtarget/ThrowOnOomMemoryTargetTest.java: ########## @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.gluten.memory.memtarget; + +import org.junit.Assert; +import org.junit.Test; + +public class ThrowOnOomMemoryTargetTest { + + @Test + public void testInterruptedBorrowSurfacesInterruptionNotOom() { Review Comment: Thanks! I'd lean toward keeping it. It's small and deterministic (a pre-set interrupt flag makes the first `Thread.sleep` in the retry loop throw right away, so there's no timing involved), and it pins exactly what this change is about: an interrupted borrow surfaces as an interruption rather than an off-heap OOM, and the interrupt status is restored rather than swallowed. If the retry loop is refactored later, this catches a silent regression back to the OOM misreport. Happy to drop it if you'd still rather not have 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
