Skip to content

Commit 92c17c7

Browse files
authored
build: increase parallelism for integration tests (#3249)
* build: increase parallelism for integration tests * fix: BulkConnectionTest must run serially
1 parent 52f8684 commit 92c17c7

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

google-cloud-spanner/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
</goals>
108108
<configuration>
109109
<groups>com.google.cloud.spanner.ParallelIntegrationTest</groups>
110-
<forkCount>8</forkCount>
110+
<forkCount>12</forkCount>
111111
<reuseForks>true</reuseForks>
112112
<groups>com.google.cloud.spanner.ParallelIntegrationTest</groups>
113113
</configuration>

google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/it/ITBulkConnectionTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636

3737
/**
3838
* Test opening multiple generic (not JDBC) Spanner connections. This test should not be run in
39-
* parallel with other tests, as it tries to close all active connections, and should not try to
40-
* close connections of other integration tests.
39+
* parallel with other tests in the same JVM, as it tries to close all active connections, and
40+
* should not try to close connections of other integration tests.
4141
*/
4242
@Category(SerialIntegrationTest.class)
4343
@RunWith(JUnit4.class)

google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/it/ITQueryOptionsTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@
1616

1717
package com.google.cloud.spanner.connection.it;
1818

19+
import com.google.cloud.spanner.ParallelIntegrationTest;
1920
import com.google.cloud.spanner.connection.ITAbstractSpannerTest;
2021
import com.google.cloud.spanner.connection.SqlScriptVerifier;
2122
import com.google.cloud.spanner.connection.SqlScriptVerifier.SpannerGenericConnection;
2223
import org.junit.Before;
2324
import org.junit.Test;
25+
import org.junit.experimental.categories.Category;
26+
import org.junit.runner.RunWith;
27+
import org.junit.runners.JUnit4;
2428

29+
@Category(ParallelIntegrationTest.class)
30+
@RunWith(JUnit4.class)
2531
public class ITQueryOptionsTest extends ITAbstractSpannerTest {
2632

2733
private static final String TEST_QUERY_OPTIONS = "ITSqlScriptTest_TestQueryOptions.sql";

google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITAsyncAPITest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
import com.google.cloud.spanner.KeySet;
4343
import com.google.cloud.spanner.Mutation;
4444
import com.google.cloud.spanner.Options;
45-
import com.google.cloud.spanner.SerialIntegrationTest;
45+
import com.google.cloud.spanner.ParallelIntegrationTest;
4646
import com.google.cloud.spanner.SpannerException;
4747
import com.google.cloud.spanner.Statement;
4848
import com.google.cloud.spanner.Struct;
@@ -68,7 +68,7 @@
6868
import org.junit.runners.JUnit4;
6969

7070
/** Integration tests for asynchronous APIs. */
71-
@Category(SerialIntegrationTest.class)
71+
@Category(ParallelIntegrationTest.class)
7272
@RunWith(JUnit4.class)
7373
public class ITAsyncAPITest {
7474
@ClassRule public static IntegrationTestEnv env = new IntegrationTestEnv();

google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITAsyncExamplesTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
import com.google.cloud.spanner.Key;
3434
import com.google.cloud.spanner.KeySet;
3535
import com.google.cloud.spanner.Mutation;
36+
import com.google.cloud.spanner.ParallelIntegrationTest;
3637
import com.google.cloud.spanner.ReadOnlyTransaction;
37-
import com.google.cloud.spanner.SerialIntegrationTest;
3838
import com.google.cloud.spanner.SpannerException;
3939
import com.google.cloud.spanner.Statement;
4040
import com.google.cloud.spanner.Struct;
@@ -59,7 +59,7 @@
5959
import org.junit.runners.JUnit4;
6060

6161
/** Integration tests for asynchronous APIs. */
62-
@Category(SerialIntegrationTest.class)
62+
@Category(ParallelIntegrationTest.class)
6363
@RunWith(JUnit4.class)
6464
public class ITAsyncExamplesTest {
6565
@ClassRule public static IntegrationTestEnv env = new IntegrationTestEnv();

0 commit comments

Comments
 (0)