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:
Pierre Villard 2024-02-07 22:19:32 +01:00 committed by exceptionfactory
parent 25e24e0377
commit ecd6ed48a9
No known key found for this signature in database
2 changed files with 21 additions and 14 deletions

View File

@ -90,19 +90,7 @@ public class TestJettyWebSocketServer {
final AtomicBoolean connected = new AtomicBoolean();
final WebSocketClient client = new WebSocketClient();
final Session.Listener.AutoDemanding adapter = new AbstractAutoDemanding() {
@Override
public void onWebSocketOpen(Session session) {
super.onWebSocketOpen(session);
connected.set(true);
}
@Override
public void onWebSocketText(final String message) {
}
};
final Session.Listener.AutoDemanding adapter = new TrackedAutoDemandingListener(connected);
try {
client.start();
@ -123,4 +111,23 @@ public class TestJettyWebSocketServer {
private URI getWebSocketUri(final int 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) {
}
}
}

View File

@ -130,7 +130,7 @@
<com.jayway.jsonpath.version>2.9.0</com.jayway.jsonpath.version>
<derby.version>10.17.1.0</derby.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>
<avro.version>1.11.3</avro.version>
<jaxb.runtime.version>4.0.4</jaxb.runtime.version>