Skip to content

Commit 9561257

Browse files
committed
Update Test, Timer on seperate threads
1 parent 70a35c3 commit 9561257

2 files changed

Lines changed: 29 additions & 14 deletions

File tree

src/ui/helper/classsearch/ClassSearchFrameTest.java

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,22 @@ public void didSelectClass(String classname) {
2929
classSearchFrame.setVisible(true);
3030
classSearchFrame.setSize(new Dimension(300, 200));
3131

32-
try {
33-
Thread.sleep(5000);
34-
classSearchFrame.setVisible(false);
35-
classSearchFrame.dispose();
36-
} catch (InterruptedException e) {
37-
e.printStackTrace();
38-
}
32+
/* Comment below to test the framework */
33+
/* Added for the purpose of continuous integration */
34+
new Thread(new Runnable() {
35+
36+
@Override
37+
public void run() {
38+
try {
39+
Thread.sleep(5000);
40+
classSearchFrame.setVisible(false);
41+
classSearchFrame.dispose();
42+
} catch (InterruptedException e) {
43+
e.printStackTrace();
44+
}
45+
46+
}
47+
}).start();
3948

4049
}
4150
});

src/ui/helper/historyui/HistoryUITest.java

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,19 @@ public void didPressButton(String buttonName, int selectedRow) {
4646

4747
/* Comment below to test the framework */
4848
/* Added for the purpose of continuous integration */
49-
try {
50-
Thread.sleep(5000);
51-
historyUI.dispose();
52-
} catch (InterruptedException e) {
53-
// TODO Auto-generated catch block
54-
e.printStackTrace();
55-
}
49+
new Thread(new Runnable() {
50+
51+
@Override
52+
public void run() {
53+
54+
try {
55+
Thread.sleep(5000);
56+
historyUI.dispose();
57+
} catch (InterruptedException e) {
58+
e.printStackTrace();
59+
}
60+
}
61+
}).start();
5662

5763

5864

0 commit comments

Comments
 (0)