Skip to content

Commit 58ad188

Browse files
committed
Giving tests more time
1 parent 83baaea commit 58ad188

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/device-runner-app/tests/BaseTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.codename1.testing.AbstractTest;
44
import com.codename1.ui.Form;
5+
import com.codename1.ui.util.UITimer;
56
import com.codename1.ui.layouts.Layout;
67
import com.codename1.testing.TestUtils;
78

@@ -12,16 +13,18 @@ protected Form createForm(String title, Layout layout, final String imageName) {
1213
return new Form(title, layout) {
1314
@Override
1415
protected void onShowCompleted() {
15-
Cn1ssDeviceRunnerHelper.emitCurrentFormScreenshot(imageName);
16-
done = true;
16+
UITimer.timer(500, false, this, () -> {
17+
Cn1ssDeviceRunnerHelper.emitCurrentFormScreenshot(imageName)
18+
done = true;
19+
});
1720
}
1821
};
1922
}
2023

2124
protected boolean waitForDone() {
2225
int timeout = 100;
2326
while(!done) {
24-
TestUtils.waitFor(10);
27+
TestUtils.waitFor(20);
2528
timeout--;
2629
if(timeout == 0) {
2730
return false;

0 commit comments

Comments
 (0)