File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
vertx-core/src/test/java/io/vertx/tests/net/quic Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 1919import io .netty .util .NetUtil ;
2020import io .vertx .core .*;
2121import io .vertx .core .buffer .Buffer ;
22+ import io .vertx .core .internal .ContextInternal ;
2223import io .vertx .core .internal .quic .QuicConnectionInternal ;
2324import io .vertx .core .internal .quic .QuicStreamInternal ;
2425import io .vertx .core .net .*;
@@ -891,12 +892,21 @@ private void testWriteWhenClosed(boolean write) throws Exception {
891892
892893 @ Test
893894 public void testRebind () {
894- Deployable deployable = ctx -> {
895- QuicServer server = QuicServer .create (vertx , SSL_OPTIONS );
896- server .handler (connection -> {
895+ Deployable deployable = new Deployable () {
896+ private QuicServer server ;
897+ @ Override
898+ public Future <?> deploy (Context ctx ) {
899+ server = QuicServer .create (vertx , SSL_OPTIONS );
900+ server .handler (connection -> {
897901
898- });
899- return server .bind (SocketAddress .inetSocketAddress (9999 , "localhost" ));
902+ });
903+ return server .bind (SocketAddress .inetSocketAddress (9999 , "localhost" ));
904+ }
905+
906+ @ Override
907+ public Future <?> undeploy (Context context ) {
908+ return server .close ();
909+ }
900910 };
901911 int num = 4 ;
902912 for (int i = 0 ;i < num ;i ++) {
You can’t perform that action at this time.
0 commit comments