Skip to content

Commit

Permalink
build: version bump: fix compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
jknack committed Aug 6, 2024
1 parent d485763 commit c61e7d8
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions tests/src/test/java/io/jooby/i2784/Issue2784.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
package io.jooby.i2784;

import java.time.Duration;
import java.util.concurrent.CountDownLatch;

import org.asynchttpclient.Dsl;
Expand Down Expand Up @@ -60,16 +61,18 @@ public void onPongFrame(byte[] payload) {
})
.build();

WebSocket webSocketClient =
Dsl.asyncHttpClient()
.prepareGet("ws://localhost:" + http.getPort() + "/2784")
.setRequestTimeout(5000)
.execute(wsHandler)
.get();
// Send ping
webSocketClient.sendPingFrame();
try (var client = Dsl.asyncHttpClient()) {
WebSocket webSocketClient =
client
.prepareGet("ws://localhost:" + http.getPort() + "/2784")
.setRequestTimeout(Duration.ofSeconds(5))
.execute(wsHandler)
.get();
// Send ping
webSocketClient.sendPingFrame();

latch.await();
latch.await();
}
});
}
}

0 comments on commit c61e7d8

Please sign in to comment.