Skip to content

Commit 68d5c68

Browse files
committed
Update Class Search Frame Test, auto quitting
1 parent 61f8435 commit 68d5c68

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/ui/helper/ClassSearchFrameTest.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class ClassSearchFrameTest {
1212

1313
@Test
1414
public void test() throws InterruptedException {
15-
SwingUtilities.invokeLater(new Runnable() {
15+
Runnable t = (new Runnable() {
1616

1717
@Override
1818
public void run() {
@@ -29,10 +29,20 @@ public void didSelectClass(String classname) {
2929
classSearchFrame.setVisible(true);
3030
classSearchFrame.setSize(new Dimension(300, 200));
3131

32+
try {
33+
Thread.sleep(10000);
34+
classSearchFrame.setVisible(false);
35+
classSearchFrame.dispose();
36+
} catch (InterruptedException e) {
37+
e.printStackTrace();
38+
}
3239

3340
}
3441
});
35-
Thread.sleep(Long.MAX_VALUE);
42+
SwingUtilities.invokeLater(t);
43+
Thread.sleep(100000);
44+
45+
3646
}
3747

3848
}

0 commit comments

Comments
 (0)