Skip to content

Commit e41b96b

Browse files
author
duke
committed
Backport d1860370635e1c96a9b6c497861e5573c23dd281
1 parent fcece2e commit e41b96b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/jdk/com/sun/jdi/TwoThreadsTest.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -55,6 +55,13 @@ public static void main(String[] args) {
5555

5656
t1.start();
5757
t2.start();
58+
// The threads might be virtual and daemon, so wait until completion.
59+
try {
60+
t1.join();
61+
t2.join();
62+
} catch (InterruptedException e) {
63+
throw new RuntimeException(e);
64+
}
5865
}
5966

6067

0 commit comments

Comments
 (0)