Skip to content

Commit 4f12a55

Browse files
Reduce test concurrency based on number of available processors
1 parent d468614 commit 4f12a55

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/test/java/oracle/r2dbc/impl/OracleStatementImplTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2302,7 +2302,8 @@ private void verifyConcurrentExecute(Connection connection) {
23022302

23032303
// Create many statements and execute them in parallel.
23042304
@SuppressWarnings({"unchecked","rawtypes"})
2305-
Publisher<Integer>[] publishers = new Publisher[8];
2305+
Publisher<Integer>[] publishers =
2306+
new Publisher[Runtime.getRuntime().availableProcessors() * 4];
23062307

23072308
for (int i = 0; i < publishers.length; i++) {
23082309
Flux<Integer> flux = Flux.from(connection.createStatement(
@@ -2334,7 +2335,8 @@ private void verifyConcurrentFetch(Connection connection) {
23342335

23352336
// Create many statements and execute them in parallel.
23362337
@SuppressWarnings({"unchecked","rawtypes"})
2337-
Publisher<Long>[] publishers = new Publisher[8];
2338+
Publisher<Long>[] publishers =
2339+
new Publisher[Runtime.getRuntime().availableProcessors() * 4];
23382340

23392341
for (int i = 0; i < publishers.length; i++) {
23402342

0 commit comments

Comments
 (0)