|
20 | 20 | import io.netty.channel.EventLoop; |
21 | 21 | import io.vertx.core.Handler; |
22 | 22 | import io.vertx.core.VertxOptions; |
| 23 | +import io.vertx.core.internal.ContextInternal; |
23 | 24 | import io.vertx.ext.unit.Async; |
24 | 25 | import io.vertx.ext.unit.TestContext; |
25 | 26 | import io.vertx.ext.unit.junit.Repeat; |
26 | 27 | import io.vertx.ext.unit.junit.RepeatRule; |
27 | | -import io.vertx.core.internal.ContextInternal; |
28 | 28 | import io.vertx.pgclient.PgBuilder; |
29 | 29 | import io.vertx.pgclient.PgConnectOptions; |
30 | 30 | import io.vertx.pgclient.PgConnection; |
|
35 | 35 | import org.junit.Rule; |
36 | 36 | import org.junit.Test; |
37 | 37 |
|
38 | | -import java.util.ArrayList; |
39 | | -import java.util.Collections; |
40 | | -import java.util.HashSet; |
41 | | -import java.util.List; |
42 | | -import java.util.Set; |
| 38 | +import java.util.*; |
43 | 39 | import java.util.concurrent.TimeUnit; |
44 | 40 | import java.util.concurrent.atomic.AtomicInteger; |
45 | 41 | import java.util.concurrent.atomic.AtomicLong; |
@@ -281,7 +277,7 @@ public void testUseAvailableResources(TestContext ctx) { |
281 | 277 |
|
282 | 278 | @Test |
283 | 279 | public void testEventLoopSize(TestContext ctx) { |
284 | | - int num = VertxOptions.DEFAULT_EVENT_LOOP_POOL_SIZE; |
| 280 | + int num = Math.min(VertxOptions.DEFAULT_EVENT_LOOP_POOL_SIZE, 50); |
285 | 281 | int size = num * 2; |
286 | 282 | Pool pool = PgBuilder.pool(b -> b.with(new PoolOptions().setMaxSize(size).setEventLoopSize(2)).connectingTo(options)); |
287 | 283 | Set<EventLoop> eventLoops = Collections.synchronizedSet(new HashSet<>()); |
|
0 commit comments