Skip to content

Commit 6c78f6b

Browse files
Refactored Cosmos live tests to run different CI for query and split tests (Azure#36326)
* Split split tests to run on separate pipelines * Added bulk preserve ordering tests to split group * skipped pslit spelling check * Added query tests pipeline for all query tests * Fixed CI issues * Moved split query continuation token tests to query tests * Refactored platform-matrix for better readability * Moved split query continuation token tests back to split ests * Refactored platform-matrix to include more tests * increased parallelism * Refactored platform-matrix to include more tests * Refactored platform-matrix to fix test matrix
1 parent dd4e725 commit 6c78f6b

File tree

56 files changed

+597
-261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+597
-261
lines changed

.vscode/cspell.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,9 @@
678678
"words": [
679679
"Pfast",
680680
"Pdirect",
681-
"Pmulti"
681+
"Pmulti",
682+
"Psplit",
683+
"Pquery"
682684
]
683685
},
684686
{

sdk/cosmos/azure-cosmos-benchmark/pom.xml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ Licensed under the MIT License.
315315
<!-- integration tests, requires Cosmos DB endpoint -->
316316
<id>fast</id>
317317
<properties>
318-
<test.groups>simple,cosmosv3</test.groups>
318+
<test.groups>simple</test.groups>
319319
</properties>
320320
<build>
321321
<plugins>
@@ -332,6 +332,48 @@ Licensed under the MIT License.
332332
</plugins>
333333
</build>
334334
</profile>
335+
<profile>
336+
<!-- integration tests, requires Cosmos DB endpoint -->
337+
<id>split</id>
338+
<properties>
339+
<test.groups>split</test.groups>
340+
</properties>
341+
<build>
342+
<plugins>
343+
<plugin>
344+
<groupId>org.apache.maven.plugins</groupId>
345+
<artifactId>maven-failsafe-plugin</artifactId>
346+
<version>3.1.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} -->
347+
<configuration>
348+
<suiteXmlFiles>
349+
<suiteXmlFile>src/test/resources/split-testng.xml</suiteXmlFile>
350+
</suiteXmlFiles>
351+
</configuration>
352+
</plugin>
353+
</plugins>
354+
</build>
355+
</profile>
356+
<profile>
357+
<!-- integration tests, requires Cosmos DB endpoint -->
358+
<id>query</id>
359+
<properties>
360+
<test.groups>query</test.groups>
361+
</properties>
362+
<build>
363+
<plugins>
364+
<plugin>
365+
<groupId>org.apache.maven.plugins</groupId>
366+
<artifactId>maven-failsafe-plugin</artifactId>
367+
<version>3.1.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} -->
368+
<configuration>
369+
<suiteXmlFiles>
370+
<suiteXmlFile>src/test/resources/query-testng.xml</suiteXmlFile>
371+
</suiteXmlFiles>
372+
</configuration>
373+
</plugin>
374+
</plugins>
375+
</build>
376+
</profile>
335377
<profile>
336378
<!-- integration tests, requires Cosmos DB endpoint -->
337379
<id>long</id>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!--
2+
~ The MIT License (MIT)
3+
~ Copyright (c) 2018 Microsoft Corporation
4+
~
5+
~ Permission is hereby granted, free of charge, to any person obtaining a copy
6+
~ of this software and associated documentation files (the "Software"), to deal
7+
~ in the Software without restriction, including without limitation the rights
8+
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
~ copies of the Software, and to permit persons to whom the Software is
10+
~ furnished to do so, subject to the following conditions:
11+
~
12+
~ The above copyright notice and this permission notice shall be included in all
13+
~ copies or substantial portions of the Software.
14+
~
15+
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
~ SOFTWARE.
22+
-->
23+
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
24+
<suite name="query">
25+
<test name="query" group-by-instances="true">
26+
<groups>
27+
<run>
28+
<include name="query"/>
29+
</run>
30+
</groups>
31+
<packages>
32+
<package name="com.azure.cosmos.*"/>
33+
</packages>
34+
</test>
35+
</suite>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!--
2+
~ The MIT License (MIT)
3+
~ Copyright (c) 2018 Microsoft Corporation
4+
~
5+
~ Permission is hereby granted, free of charge, to any person obtaining a copy
6+
~ of this software and associated documentation files (the "Software"), to deal
7+
~ in the Software without restriction, including without limitation the rights
8+
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
~ copies of the Software, and to permit persons to whom the Software is
10+
~ furnished to do so, subject to the following conditions:
11+
~
12+
~ The above copyright notice and this permission notice shall be included in all
13+
~ copies or substantial portions of the Software.
14+
~
15+
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
~ SOFTWARE.
22+
-->
23+
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
24+
<suite name="split">
25+
<test name="split" group-by-instances="true">
26+
<groups>
27+
<run>
28+
<include name="split"/>
29+
</run>
30+
</groups>
31+
<packages>
32+
<package name="com.azure.cosmos.*"/>
33+
</packages>
34+
</test>
35+
</suite>

sdk/cosmos/azure-cosmos-dotnet-benchmark/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ Licensed under the MIT License.
231231
<!-- integration tests, requires Cosmos DB endpoint -->
232232
<id>fast</id>
233233
<properties>
234-
<test.groups>simple,cosmosv3</test.groups>
234+
<test.groups>simple</test.groups>
235235
</properties>
236236
<build>
237237
<plugins>

sdk/cosmos/azure-cosmos-tests/pom.xml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ Licensed under the MIT License.
295295
<!-- integration tests, requires Cosmos DB endpoint -->
296296
<id>fast</id>
297297
<properties>
298-
<test.groups>simple,cosmosv3</test.groups>
298+
<test.groups>simple</test.groups>
299299
</properties>
300300
<build>
301301
<plugins>
@@ -312,6 +312,48 @@ Licensed under the MIT License.
312312
</plugins>
313313
</build>
314314
</profile>
315+
<profile>
316+
<!-- integration tests, requires Cosmos DB endpoint -->
317+
<id>split</id>
318+
<properties>
319+
<test.groups>split</test.groups>
320+
</properties>
321+
<build>
322+
<plugins>
323+
<plugin>
324+
<groupId>org.apache.maven.plugins</groupId>
325+
<artifactId>maven-failsafe-plugin</artifactId>
326+
<version>3.1.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} -->
327+
<configuration>
328+
<suiteXmlFiles>
329+
<suiteXmlFile>src/test/resources/split-testng.xml</suiteXmlFile>
330+
</suiteXmlFiles>
331+
</configuration>
332+
</plugin>
333+
</plugins>
334+
</build>
335+
</profile>
336+
<profile>
337+
<!-- integration tests, requires Cosmos DB endpoint -->
338+
<id>query</id>
339+
<properties>
340+
<test.groups>query</test.groups>
341+
</properties>
342+
<build>
343+
<plugins>
344+
<plugin>
345+
<groupId>org.apache.maven.plugins</groupId>
346+
<artifactId>maven-failsafe-plugin</artifactId>
347+
<version>3.1.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} -->
348+
<configuration>
349+
<suiteXmlFiles>
350+
<suiteXmlFile>src/test/resources/query-testng.xml</suiteXmlFile>
351+
</suiteXmlFiles>
352+
</configuration>
353+
</plugin>
354+
</plugins>
355+
</build>
356+
</profile>
315357
<profile>
316358
<!-- integration tests, requires Cosmos DB endpoint -->
317359
<id>long</id>

sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/AsyncCacheNonBlockingIntegrationTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ public AsyncCacheNonBlockingIntegrationTest(CosmosClientBuilder clientBuilder) {
5151
super(clientBuilder);
5252
}
5353

54-
@BeforeClass(groups = {"simple"}, timeOut = SETUP_TIMEOUT)
54+
@BeforeClass(groups = {"split"}, timeOut = SETUP_TIMEOUT)
5555
public void before_CosmosBulkAsyncTest() {
5656
assertThat(this.bulkClient).isNull();
5757
this.bulkClient = getClientBuilder().buildAsyncClient();
5858
createdDatabase = getSharedCosmosDatabase(this.bulkClient);
5959
}
6060

61-
@AfterClass(groups = {"simple"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true)
61+
@AfterClass(groups = {"split"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true)
6262
public void afterClass() {
6363
safeClose(this.bulkClient);
6464
}
6565

66-
@Test(groups = {"simple"}, timeOut = TIMEOUT * 20)
66+
@Test(groups = {"split"}, timeOut = TIMEOUT * 20)
6767
public void createItem_withCacheRefresh() throws InterruptedException {
6868
String containerId = "bulksplittestcontainer_" + UUID.randomUUID();
6969
int totalRequest = getTotalRequest();

sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosBulkAsyncTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public CosmosBulkAsyncTest(CosmosClientBuilder clientBuilder) {
6363
super(clientBuilder);
6464
}
6565

66-
@BeforeClass(groups = {"simple"}, timeOut = SETUP_TIMEOUT)
66+
@BeforeClass(groups = {"simple", "split"}, timeOut = SETUP_TIMEOUT)
6767
public void before_CosmosBulkAsyncTest() {
6868
assertThat(this.bulkClient).isNull();
6969
ThrottlingRetryOptions throttlingOptions = new ThrottlingRetryOptions()
@@ -73,7 +73,7 @@ public void before_CosmosBulkAsyncTest() {
7373
bulkAsyncContainer = getSharedMultiPartitionCosmosContainer(this.bulkClient);
7474
}
7575

76-
@AfterClass(groups = {"simple"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true)
76+
@AfterClass(groups = {"simple", "split"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true)
7777
public void afterClass() {
7878
safeClose(this.bulkClient);
7979
}
@@ -869,7 +869,7 @@ public Object[][] faultInjectionProvider() {
869869
}
870870

871871
// tests preserving order in the regular retry flow and when a partition split happens
872-
@Test(groups = { "simple" }, timeOut = TIMEOUT * 30, dataProvider = "faultInjectionProvider")
872+
@Test(groups = { "split" }, timeOut = TIMEOUT * 30, dataProvider = "faultInjectionProvider")
873873
public void executeBulk_preserveOrdering_OnFaults(FaultInjectionRule rule) {
874874
int totalRequest = 100;
875875

sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosBulkGatewayTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@ public CosmosBulkGatewayTest(CosmosClientBuilder clientBuilder) {
4444
super(clientBuilder);
4545
}
4646

47-
@BeforeClass(groups = {"simple"}, timeOut = SETUP_TIMEOUT)
47+
@BeforeClass(groups = {"split"}, timeOut = SETUP_TIMEOUT)
4848
public void before_CosmosBulkAsyncTest() {
4949
assertThat(this.bulkClient).isNull();
5050
this.bulkClient = getClientBuilder().buildAsyncClient();
5151
createdDatabase = getSharedCosmosDatabase(this.bulkClient);
5252
}
5353

54-
@AfterClass(groups = {"simple"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true)
54+
@AfterClass(groups = {"split"}, timeOut = SHUTDOWN_TIMEOUT, alwaysRun = true)
5555
public void afterClass() {
5656
safeClose(this.bulkClient);
5757
}
5858

59-
@Test(groups = {"simple"}, timeOut = TIMEOUT * 20)
59+
@Test(groups = {"split"}, timeOut = TIMEOUT * 20)
6060
public void createItem_withBulk_split() throws InterruptedException {
6161
String containerId = "bulksplittestcontainer_" + UUID.randomUUID();
6262
int totalRequest = getTotalRequest();

sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/faultinjection/FaultInjectionConnectionErrorRuleTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public FaultInjectionConnectionErrorRuleTests(CosmosClientBuilder clientBuilder)
6767
super(clientBuilder);
6868
}
6969

70-
@BeforeClass(groups = {"multi-region", "simple"}, timeOut = TIMEOUT)
70+
@BeforeClass(groups = {"multi-region", "long"}, timeOut = TIMEOUT)
7171
public void beforeClass() {
7272
try {
7373
client = getClientBuilder().buildAsyncClient();
@@ -81,7 +81,7 @@ public void beforeClass() {
8181
}
8282
}
8383

84-
@Test(groups = {"simple"}, dataProvider = "connectionErrorTypeProvider", timeOut = TIMEOUT)
84+
@Test(groups = {"long"}, dataProvider = "connectionErrorTypeProvider", timeOut = TIMEOUT)
8585
public void faultInjectionConnectionErrorRuleTestWithNoConnectionWarmup(FaultInjectionConnectionErrorType errorType) {
8686

8787
client = new CosmosClientBuilder()

0 commit comments

Comments
 (0)