Skip to content

Commit 68d0075

Browse files
committed
Update test to match InterruptedException guidelines
1 parent 4907488 commit 68d0075

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/java/org/apache/commons/collections4/map/LRUMapTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@ public void run() {
612612
map.entrySet().removeIf(entry -> entry.getValue() == this);
613613
}
614614
} catch (final InterruptedException e) {
615+
interrupt();
615616
fail("Unexpected InterruptedException");
616617
}
617618
if (i > 0) {
@@ -696,6 +697,7 @@ public void run() {
696697
}
697698
}
698699
} catch (final InterruptedException e) {
700+
interrupt();
699701
fail("Unexpected InterruptedException");
700702
}
701703
if (i > 0) {
@@ -780,6 +782,7 @@ public void run() {
780782
}
781783
}
782784
} catch (final InterruptedException e) {
785+
interrupt();
783786
fail("Unexpected InterruptedException");
784787
}
785788
if (i > 0) {
@@ -859,6 +862,7 @@ public void run() {
859862
map.values().removeIf(thread1 -> thread1 == this);
860863
}
861864
} catch (final InterruptedException e) {
865+
interrupt();
862866
fail("Unexpected InterruptedException");
863867
}
864868
if (i > 0) {

0 commit comments

Comments
 (0)