Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
[fix][test] Fix thread leak in concurrent collections tests (apache#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari authored Oct 27, 2023
1 parent 2b5c199 commit b5ac129
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public void testConcurrentExpandAndShrinkAndGet() throws Throwable {
} catch (Exception e) {
throw new RuntimeException(e);
}
while (true) {
while (!Thread.currentThread().isInterrupted()) {
try {
map.get(1, 1);
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public void testConcurrentExpandAndShrinkAndGet() throws Throwable {
} catch (Exception e) {
throw new RuntimeException(e);
}
while (true) {
while (!Thread.currentThread().isInterrupted()) {
try {
set.contains(1, 1);
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public void testConcurrentExpandAndShrinkAndGet() throws Throwable {
} catch (Exception e) {
throw new RuntimeException(e);
}
while (true) {
while (!Thread.currentThread().isInterrupted()) {
try {
map.get("k2");
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public void testConcurrentExpandAndShrinkAndGet() throws Throwable {
} catch (Exception e) {
throw new RuntimeException(e);
}
while (true) {
while (!Thread.currentThread().isInterrupted()) {
try {
set.contains("k2");
} catch (Exception e) {
Expand Down

0 comments on commit b5ac129

Please sign in to comment.