mirror of https://github.com/apache/nifi.git
NIFI-12755 Upgraded Jetty from 12.0.5 to 12.0.6
- Refactored WebSocket Test Listener to avoid method visibility problem This closes #8374 Co-authored-by: David Handermann <exceptionfactory@apache.org> Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
parent
25e24e0377
commit
ecd6ed48a9
|
@ -90,19 +90,7 @@ public class TestJettyWebSocketServer {
|
||||||
final AtomicBoolean connected = new AtomicBoolean();
|
final AtomicBoolean connected = new AtomicBoolean();
|
||||||
|
|
||||||
final WebSocketClient client = new WebSocketClient();
|
final WebSocketClient client = new WebSocketClient();
|
||||||
final Session.Listener.AutoDemanding adapter = new AbstractAutoDemanding() {
|
final Session.Listener.AutoDemanding adapter = new TrackedAutoDemandingListener(connected);
|
||||||
@Override
|
|
||||||
public void onWebSocketOpen(Session session) {
|
|
||||||
super.onWebSocketOpen(session);
|
|
||||||
connected.set(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onWebSocketText(final String message) {
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
client.start();
|
client.start();
|
||||||
|
@ -123,4 +111,23 @@ public class TestJettyWebSocketServer {
|
||||||
private URI getWebSocketUri(final int port) {
|
private URI getWebSocketUri(final int port) {
|
||||||
return URI.create(String.format("ws://localhost:%d", port));
|
return URI.create(String.format("ws://localhost:%d", port));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class TrackedAutoDemandingListener extends AbstractAutoDemanding {
|
||||||
|
private final AtomicBoolean connected;
|
||||||
|
|
||||||
|
public TrackedAutoDemandingListener(final AtomicBoolean connected) {
|
||||||
|
this.connected = connected;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onWebSocketOpen(Session session) {
|
||||||
|
super.onWebSocketOpen(session);
|
||||||
|
connected.set(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onWebSocketText(final String message) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -130,7 +130,7 @@
|
||||||
<com.jayway.jsonpath.version>2.9.0</com.jayway.jsonpath.version>
|
<com.jayway.jsonpath.version>2.9.0</com.jayway.jsonpath.version>
|
||||||
<derby.version>10.17.1.0</derby.version>
|
<derby.version>10.17.1.0</derby.version>
|
||||||
<ranger.version>2.4.0</ranger.version>
|
<ranger.version>2.4.0</ranger.version>
|
||||||
<jetty.version>12.0.5</jetty.version>
|
<jetty.version>12.0.6</jetty.version>
|
||||||
<jackson.bom.version>2.16.1</jackson.bom.version>
|
<jackson.bom.version>2.16.1</jackson.bom.version>
|
||||||
<avro.version>1.11.3</avro.version>
|
<avro.version>1.11.3</avro.version>
|
||||||
<jaxb.runtime.version>4.0.4</jaxb.runtime.version>
|
<jaxb.runtime.version>4.0.4</jaxb.runtime.version>
|
||||||
|
|
Loading…
Reference in New Issue