This is an automated email from the ASF dual-hosted git repository.
jtulach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-html4j.git
The following commit(s) were added to refs/heads/master by this push:
new 8f34d2f When WebkitPresenter initialization succeeds, the Future is
blocked executing GTK main loop. Wait just a while to give the presenter chance
to throw linkage errors.
8f34d2f is described below
commit 8f34d2f410c787778a03129eae874fd60ad55e88
Author: Jaroslav Tulach <[email protected]>
AuthorDate: Wed Oct 30 06:00:54 2019 +0100
When WebkitPresenter initialization succeeds, the Future is blocked
executing GTK main loop. Wait just a while to give the presenter chance to
throw linkage errors.
---
.../org/netbeans/html/presenters/webkit/GtkJavaScriptTest.java | 8 +++++++-
.../java/org/netbeans/html/presenters/webkit/GtkKnockoutTest.java | 8 +++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git
a/webkit/src/test/java/org/netbeans/html/presenters/webkit/GtkJavaScriptTest.java
b/webkit/src/test/java/org/netbeans/html/presenters/webkit/GtkJavaScriptTest.java
index dc42bcd..0a294e8 100644
---
a/webkit/src/test/java/org/netbeans/html/presenters/webkit/GtkJavaScriptTest.java
+++
b/webkit/src/test/java/org/netbeans/html/presenters/webkit/GtkJavaScriptTest.java
@@ -26,6 +26,8 @@ import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
import net.java.html.BrwsrCtx;
import net.java.html.boot.BrowserBuilder;
import org.netbeans.html.boot.spi.Fn;
@@ -63,7 +65,11 @@ public class GtkJavaScriptTest extends JavaScriptTCK {
List<Object> res = new ArrayList<>();
try {
- future.get();
+ try {
+ future.get(3, TimeUnit.SECONDS);
+ } catch (TimeoutException ex) {
+ // no error in given time, let's go on
+ }
Class<? extends Annotation> test =
loadClass().getClassLoader().loadClass(KOTest.class.getName()).
asSubclass(Annotation.class);
diff --git
a/webkit/src/test/java/org/netbeans/html/presenters/webkit/GtkKnockoutTest.java
b/webkit/src/test/java/org/netbeans/html/presenters/webkit/GtkKnockoutTest.java
index 946601b..8cb518f 100644
---
a/webkit/src/test/java/org/netbeans/html/presenters/webkit/GtkKnockoutTest.java
+++
b/webkit/src/test/java/org/netbeans/html/presenters/webkit/GtkKnockoutTest.java
@@ -35,6 +35,8 @@ import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
import net.java.html.BrwsrCtx;
import net.java.html.boot.BrowserBuilder;
import net.java.html.js.JavaScriptBody;
@@ -87,7 +89,11 @@ public final class GtkKnockoutTest extends KnockoutTCK {
List<Object> res = new ArrayList<>();
try {
- future.get();
+ try {
+ future.get(3, TimeUnit.SECONDS);
+ } catch (TimeoutException ex) {
+ // no error in given time, let's go on
+ }
ClassLoader l = getClassLoader();
for (Class oldC : arr) {
Class<?> c = Class.forName(oldC.getName(), true, l);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists