Skip to content

Commit

Permalink
Merging with master.
Browse files Browse the repository at this point in the history
  • Loading branch information
dukescript committed Oct 12, 2019
2 parents cdde5d7 + 2d6140d commit 383122e
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 3 deletions.
17 changes: 15 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -519,14 +519,27 @@ org.netbeans.html.boot.impl:org.netbeans.html.boot.fx:org.netbeans.html.context.
<version>1.2</version>
<executions>
<execution>
<id>check</id>
<goals>
<goal>generate</goal>
<goal>check</goal>
</goals>
<phase>integration-test</phase>
<configuration>
<packages>${sigtestPackages}</packages>
</configuration>
</execution>
<execution>
<id>generate</id>
<goals>
<goal>generate</goal>
</goals>
<phase>package</phase>
<configuration>
<packages>${publicPackages}</packages>
</configuration>
</execution>
</executions>
<configuration>
<packages>${sigtestPackages}</packages>
<releaseVersion>1.6.1</releaseVersion>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
package org.netbeans.html.presenters.webkit;

import org.netbeans.html.presenters.webkit.WebKitPresenter;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
Expand Down Expand Up @@ -53,6 +52,7 @@
public final class GtkKnockoutTest extends KnockoutTCK {
private static Class<?> browserClass;
private static Fn.Presenter browserContext;
private static final Timeout WATCHER = new Timeout(60000);

public GtkKnockoutTest() {
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.netbeans.html.presenters.webkit;

import java.io.PrintStream;
import java.util.Map.Entry;

final class Timeout implements Runnable {
private final long timeout;
private final Thread thread;

Timeout(long timeout) {
this.timeout = timeout;
this.thread = new Thread(this, "Timeout Watcher");
this.thread.setDaemon(true);
this.thread.start();
}

@Override
public void run() {
try {
Thread.sleep(timeout);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
System.err.println("Timeout in " + timeout + " ms");
dumpThreads(System.err);
}

private static void dumpThreads(PrintStream ps) {
for (Entry<Thread,StackTraceElement[]> e : Thread.getAllStackTraces().entrySet()) {
ps.println("Thread " + e.getKey().getName() + ":");
for (StackTraceElement t : e.getValue()) {
ps.println(" " + t);
}
}
ps.println();
}
}

0 comments on commit 383122e

Please sign in to comment.