This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git


The following commit(s) were added to refs/heads/master by this push:
     new 68d007525 Update test to match InterruptedException guidelines
68d007525 is described below

commit 68d0075256ec676f4fc480c9d925a62994cc205c
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Jan 28 08:39:04 2026 -0500

    Update test to match InterruptedException guidelines
---
 src/test/java/org/apache/commons/collections4/map/LRUMapTest.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/test/java/org/apache/commons/collections4/map/LRUMapTest.java 
b/src/test/java/org/apache/commons/collections4/map/LRUMapTest.java
index b15998dbe..db65f2e2a 100644
--- a/src/test/java/org/apache/commons/collections4/map/LRUMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/LRUMapTest.java
@@ -612,6 +612,7 @@ public class LRUMapTest<K, V> extends 
AbstractOrderedMapTest<K, V> {
                             map.entrySet().removeIf(entry -> entry.getValue() 
== this);
                         }
                     } catch (final InterruptedException e) {
+                        interrupt();
                         fail("Unexpected InterruptedException");
                     }
                     if (i > 0) {
@@ -696,6 +697,7 @@ public class LRUMapTest<K, V> extends 
AbstractOrderedMapTest<K, V> {
                             }
                         }
                     } catch (final InterruptedException e) {
+                        interrupt();
                         fail("Unexpected InterruptedException");
                     }
                     if (i > 0) {
@@ -780,6 +782,7 @@ public class LRUMapTest<K, V> extends 
AbstractOrderedMapTest<K, V> {
                             }
                         }
                     } catch (final InterruptedException e) {
+                        interrupt();
                         fail("Unexpected InterruptedException");
                     }
                     if (i > 0) {
@@ -859,6 +862,7 @@ public class LRUMapTest<K, V> extends 
AbstractOrderedMapTest<K, V> {
                             map.values().removeIf(thread1 -> thread1 == this);
                         }
                     } catch (final InterruptedException e) {
+                        interrupt();
                         fail("Unexpected InterruptedException");
                     }
                     if (i > 0) {

Reply via email to