Skip to content

Commit dfc553e

Browse files
committed
Run more tests concurrently in CI
* Run sync tests together * Run reactive tests together * Run core and legacy together * Run bson and crypt tests together JAVA-5628
1 parent b866e88 commit dfc553e

File tree

2 files changed

+61
-22
lines changed

2 files changed

+61
-22
lines changed

.evergreen/.evg.yml

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ functions:
287287
288288
AUTH="${AUTH}" SSL="${SSL}" MONGODB_URI="${MONGODB_URI}" SAFE_FOR_MULTI_MONGOS="${SAFE_FOR_MULTI_MONGOS}" TOPOLOGY="${TOPOLOGY}" \
289289
COMPRESSOR="${COMPRESSOR}" JAVA_VERSION="${JAVA_VERSION}" REQUIRE_API_VERSION=${REQUIRE_API_VERSION} \
290-
.evergreen/run-tests.sh
290+
TESTS="${TESTS}" .evergreen/run-tests.sh
291291
292292
"run load-balancer tests":
293293
- command: shell.exec
@@ -335,7 +335,7 @@ functions:
335335
AUTH="${AUTH}" SSL="${SSL}" MONGODB_URI="${MONGODB_URI}" TOPOLOGY="${TOPOLOGY}" COMPRESSOR="${COMPRESSOR}" \
336336
JAVA_VERSION="${JAVA_VERSION}" \
337337
AZUREKMS_KEY_VAULT_ENDPOINT=${testazurekms_keyvaultendpoint} AZUREKMS_KEY_NAME=${testazurekms_keyname} \
338-
SLOW_TESTS_ONLY=true .evergreen/run-tests.sh
338+
TESTS="testSlowOnly" .evergreen/run-tests.sh
339339
340340
"run scala tests":
341341
- command: shell.exec
@@ -861,11 +861,35 @@ tasks:
861861
vars:
862862
file: ".evergreen/static-checks.sh"
863863

864-
- name: "test"
864+
- name: "test-bson-and-crypt"
865+
commands:
866+
- func: "run tests"
867+
vars:
868+
TESTS: 'bson:test bson-kotlin:test bson-kotlinx:test bson-scala:test bson-record-codec:test mongodb-crypt:test'
869+
870+
- name: "test-core-and-legacy"
871+
commands:
872+
- func: "start-kms-kmip-server"
873+
- func: "bootstrap mongo-orchestration"
874+
- func: "run tests"
875+
vars:
876+
TESTS: 'driver-core:test driver-legacy:test'
877+
878+
- name: "test-sync"
865879
commands:
866880
- func: "start-kms-kmip-server"
867881
- func: "bootstrap mongo-orchestration"
868882
- func: "run tests"
883+
vars:
884+
TESTS: 'driver-sync:test driver-kotlin-sync:test'
885+
886+
- name: "test-reactive"
887+
commands:
888+
- func: "start-kms-kmip-server"
889+
- func: "bootstrap mongo-orchestration"
890+
- func: "run tests"
891+
vars:
892+
TESTS: 'driver-reactive-streams:test driver-kotlin-coroutine:test'
869893

870894
- name: load-balancer-test
871895
commands:
@@ -2105,14 +2129,18 @@ buildvariants:
21052129
display_name: "${version} ${compressor} ${topology} ${auth} ${ssl} ${jdk} ${os} "
21062130
tags: ["tests-variant"]
21072131
tasks:
2108-
- name: "test"
2132+
- name: "test-sync"
2133+
- name: "test-reactive"
2134+
- name: "test-core-and-legacy"
21092135

21102136
- matrix_name: "tests-snappy-compression"
21112137
matrix_spec: { compressor : "snappy", auth: "noauth", ssl: "nossl", jdk: "jdk8", version: "*", topology: "standalone", os: "linux" }
21122138
display_name: "${version} ${compressor} ${topology} ${auth} ${ssl} ${jdk} ${os} "
21132139
tags: ["tests-variant"]
21142140
tasks:
2115-
- name: "test"
2141+
- name: "test-sync"
2142+
- name: "test-reactive"
2143+
- name: "test-core-and-legacy"
21162144

21172145
- matrix_name: "tests-zstd-compression"
21182146
matrix_spec: { compressor : "zstd", auth: "noauth", ssl: "nossl", jdk: "jdk8",
@@ -2121,15 +2149,26 @@ buildvariants:
21212149
display_name: "${version} ${compressor} ${topology} ${auth} ${ssl} ${jdk} ${os} "
21222150
tags: ["tests-variant"]
21232151
tasks:
2124-
- name: "test"
2152+
- name: "test-sync"
2153+
- name: "test-reactive"
2154+
- name: "test-core-and-legacy"
2155+
2156+
- matrix_name: "tests-unit"
2157+
matrix_spec: { jdk: [ "jdk8", "jdk11", "jdk17", "jdk21"], os: "linux" }
2158+
display_name: "${jdk} ${os} Unit"
2159+
tags: ["tests-variant"]
2160+
tasks:
2161+
- name: "test-bson-and-crypt"
21252162

21262163
- matrix_name: "tests-jdk8-unsecure"
21272164
matrix_spec: { auth: "noauth", ssl: "nossl", jdk: "jdk8", version: ["4.0", "4.2", "4.4", "5.0", "6.0", "7.0", "8.0", "latest"],
21282165
topology: "*", os: "linux" }
21292166
display_name: "${version} ${topology} ${auth} ${ssl} ${jdk} ${os} "
21302167
tags: ["tests-variant"]
21312168
tasks:
2132-
- name: "test"
2169+
- name: "test-sync"
2170+
- name: "test-reactive"
2171+
- name: "test-core-and-legacy"
21332172

21342173
- matrix_name: "tests-jdk-secure"
21352174
matrix_spec: { auth: "auth", ssl: "ssl", jdk: [ "jdk8", "jdk17", "jdk21"],
@@ -2138,22 +2177,28 @@ buildvariants:
21382177
display_name: "${version} ${topology} ${auth} ${ssl} ${jdk} ${os} "
21392178
tags: ["tests-variant"]
21402179
tasks:
2141-
- name: "test"
2180+
- name: "test-sync"
2181+
- name: "test-reactive"
2182+
- name: "test-core-and-legacy"
21422183

21432184
- matrix_name: "tests-jdk-secure-jdk11"
21442185
matrix_spec: { auth: "auth", ssl: "ssl", jdk: ["jdk11"], version: ["7.0"], topology: ["replicaset"], os: "linux" }
21452186
display_name: "${version} ${topology} ${auth} ${ssl} ${jdk} ${os} "
21462187
tags: ["tests-variant"]
21472188
tasks:
2148-
- name: "test"
2189+
- name: "test-sync"
2190+
- name: "test-reactive"
2191+
- name: "test-core-and-legacy"
21492192

21502193
- matrix_name: "tests-require-api-version"
21512194
matrix_spec: { api-version: "required", auth: "auth", ssl: "nossl", jdk: ["jdk21"], version: ["5.0", "6.0", "7.0", "8.0", "latest"],
21522195
topology: "standalone", os: "linux" }
21532196
display_name: "${version} ${topology} ${api-version} "
21542197
tags: ["tests-variant"]
21552198
tasks:
2156-
- name: "test"
2199+
- name: "test-sync"
2200+
- name: "test-reactive"
2201+
- name: "test-core-and-legacy"
21572202

21582203
- matrix_name: "tests-load-balancer-secure"
21592204
matrix_spec: { auth: "auth", ssl: "ssl", jdk: ["jdk21"], version: ["5.0", "6.0", "7.0", "8.0", "latest"], topology: "sharded-cluster",

.evergreen/run-tests.sh

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ MONGODB_URI=${MONGODB_URI:-}
3535
TOPOLOGY=${TOPOLOGY:-server}
3636
COMPRESSOR=${COMPRESSOR:-}
3737
STREAM_TYPE=${STREAM_TYPE:-nio2}
38+
TESTS=${TESTS:-test}
3839
SLOW_TESTS_ONLY=${SLOW_TESTS_ONLY:-false}
3940

4041
export ASYNC_TYPE="-Dorg.mongodb.test.async.type=${STREAM_TYPE}"
@@ -136,15 +137,8 @@ echo "Running $AUTH tests over $SSL for $TOPOLOGY and connecting to $MONGODB_URI
136137
echo "Running tests with Java ${JAVA_VERSION}"
137138
./gradlew -version
138139

139-
if [ "$SLOW_TESTS_ONLY" == "true" ]; then
140-
./gradlew -PjavaVersion=${JAVA_VERSION} -Dorg.mongodb.test.uri=${MONGODB_URI} \
141-
${MULTI_MONGOS_URI_SYSTEM_PROPERTY} ${GRADLE_EXTRA_VARS} ${ASYNC_TYPE} \
142-
${JAVA_SYSPROP_NETTY_SSL_PROVIDER} \
143-
--stacktrace --info testSlowOnly
144-
else
145-
./gradlew -PjavaVersion=${JAVA_VERSION} -Dorg.mongodb.test.uri=${MONGODB_URI} \
146-
${MULTI_MONGOS_URI_SYSTEM_PROPERTY} ${API_VERSION} ${GRADLE_EXTRA_VARS} ${ASYNC_TYPE} \
147-
${JAVA_SYSPROP_NETTY_SSL_PROVIDER} \
148-
-Dorg.mongodb.test.fle.on.demand.credential.test.failure.enabled=true \
149-
--stacktrace --info --continue test
150-
fi
140+
./gradlew -PjavaVersion=${JAVA_VERSION} -Dorg.mongodb.test.uri=${MONGODB_URI} \
141+
${MULTI_MONGOS_URI_SYSTEM_PROPERTY} ${API_VERSION} ${GRADLE_EXTRA_VARS} ${ASYNC_TYPE} \
142+
${JAVA_SYSPROP_NETTY_SSL_PROVIDER} \
143+
-Dorg.mongodb.test.fle.on.demand.credential.test.failure.enabled=true \
144+
--stacktrace --info --continue ${TESTS}

0 commit comments

Comments
 (0)