Skip to content

Commit 72a6d15

Browse files
committed
Is the timeout due to JIT optimizations?
1 parent ea48398 commit 72a6d15

File tree

1 file changed

+4
-4
lines changed
  • scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests

1 file changed

+4
-4
lines changed

scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/BaseTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
import com.codename1.testing.TestUtils;
88

99
public abstract class BaseTest extends AbstractTest {
10-
private boolean done;
10+
private volatile boolean done;
1111

1212
protected Form createForm(String title, Layout layout, final String imageName) {
1313
return new Form(title, layout) {
1414
@Override
1515
protected void onShowCompleted() {
1616
registerReadyCallback(this, () -> {
1717
Cn1ssDeviceRunnerHelper.emitCurrentFormScreenshot(imageName);
18-
done = true;
18+
done();
1919
});
2020
}
2121
};
@@ -26,11 +26,11 @@ protected void registerReadyCallback(Form parent, Runnable run) {
2626
UITimer.timer(1500, false, parent, run);
2727
}
2828

29-
protected void done() {
29+
protected synchronized void done() {
3030
this.done = true;
3131
}
3232

33-
public boolean isDone() {
33+
public synchronized boolean isDone() {
3434
return done;
3535
}
3636
}

0 commit comments

Comments
 (0)