Skip to content

Commit 6fb7e4e

Browse files
author
Artur Ciocanu
committed
Use separate test group for Testcontainers IT
Signed-off-by: Artur Ciocanu <[email protected]>
1 parent 8ade7d1 commit 6fb7e4e

File tree

5 files changed

+12
-1
lines changed

5 files changed

+12
-1
lines changed

.github/workflows/build.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,12 @@ jobs:
117117
uses: codecov/[email protected]
118118
- name: Install jars
119119
run: ./mvnw install -q -B -DskipTests
120+
- name: Integration tests with testcontainers using spring boot version ${{ matrix.spring-boot-version }}
121+
id: integration_tests_testcontainers
122+
run: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -f sdk-tests/pom.xml verify -Dtest.groups=testcontainers
120123
- name: Integration tests using spring boot version ${{ matrix.spring-boot-version }}
121124
id: integration_tests
122-
run: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -f sdk-tests/pom.xml verify
125+
run: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -f sdk-tests/pom.xml verify -Dtest.excluded.groups=testcontainers
123126
- name: Upload test report for sdk
124127
uses: actions/upload-artifact@v4
125128
with:

sdk-tests/pom.xml

+2
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@
346346
<configuration>
347347
<!--suppress UnresolvedMavenProperty -->
348348
<skip>${skipITs}</skip>
349+
<groups>${test.groups}</groups>
350+
<excludedGroups>${test.excluded.groups}</excludedGroups>
349351
</configuration>
350352
</execution>
351353
</executions>

sdk-tests/src/test/java/io/dapr/it/testcontainers/DaprContainerTest.java

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import okhttp3.Request;
2626
import okhttp3.Response;
2727
import org.junit.jupiter.api.BeforeEach;
28+
import org.junit.jupiter.api.Tag;
2829
import org.junit.jupiter.api.Test;
2930
import org.testcontainers.junit.jupiter.Container;
3031
import org.testcontainers.junit.jupiter.Testcontainers;
@@ -48,6 +49,7 @@
4849

4950
@Testcontainers
5051
@WireMockTest(httpPort = 8081)
52+
@Tag("testcontainers")
5153
public class DaprContainerTest {
5254

5355
// Time-to-live for messages published.

sdk-tests/src/test/java/io/dapr/it/testcontainers/DaprModuleTests.java

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import io.dapr.workflows.runtime.WorkflowRuntime;
2020
import io.dapr.workflows.runtime.WorkflowRuntimeBuilder;
2121
import org.junit.jupiter.api.BeforeEach;
22+
import org.junit.jupiter.api.Tag;
2223
import org.junit.jupiter.api.Test;
2324
import org.springframework.beans.factory.annotation.Autowired;
2425
import org.springframework.boot.test.context.SpringBootTest;
@@ -33,6 +34,7 @@
3334

3435
@SpringBootTest(classes = MyTestWithWorkflowsApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT)
3536
@Testcontainers
37+
@Tag("testcontainers")
3638
public class DaprModuleTests {
3739

3840
@Autowired

sdk-tests/src/test/java/io/dapr/it/testcontainers/DaprPlacementContainerTest.java

+2
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414
package io.dapr.it.testcontainers;
1515

1616
import io.dapr.testcontainers.DaprPlacementContainer;
17+
import org.junit.jupiter.api.Tag;
1718
import org.junit.jupiter.api.Test;
1819
import org.testcontainers.junit.jupiter.Container;
1920
import org.testcontainers.junit.jupiter.Testcontainers;
2021

2122
import static org.junit.jupiter.api.Assertions.assertEquals;
2223

2324
@Testcontainers
25+
@Tag("testcontainers")
2426
public class DaprPlacementContainerTest {
2527

2628
@Container

0 commit comments

Comments
 (0)