Skip to content

Commit b5869ab

Browse files
authored
Move Grafana tests to JUnit Jupiter (#10737)
1 parent 5b8fdbc commit b5869ab

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

modules/grafana/build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,20 @@ description = "Testcontainers :: Grafana"
33
dependencies {
44
api project(':testcontainers')
55

6+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.11.0'
7+
8+
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.4'
69
testImplementation 'org.assertj:assertj-core:3.27.4'
710
testImplementation 'io.rest-assured:rest-assured:5.5.6'
811
testImplementation 'io.micrometer:micrometer-registry-otlp:1.15.3'
9-
testImplementation 'uk.org.webcompere:system-stubs-junit4:2.1.8'
12+
testImplementation 'uk.org.webcompere:system-stubs-jupiter:2.1.8'
1013

1114
testImplementation platform('io.opentelemetry:opentelemetry-bom:1.53.0')
1215
testImplementation 'io.opentelemetry:opentelemetry-api'
1316
testImplementation 'io.opentelemetry:opentelemetry-sdk'
1417
testImplementation 'io.opentelemetry:opentelemetry-exporter-otlp'
1518
}
19+
20+
test {
21+
useJUnitPlatform()
22+
}

modules/grafana/src/test/java/org/testcontainers/grafana/LgtmStackContainerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@
2121
import io.restassured.RestAssured;
2222
import io.restassured.response.Response;
2323
import org.awaitility.Awaitility;
24-
import org.junit.Test;
24+
import org.junit.jupiter.api.Test;
2525
import uk.org.webcompere.systemstubs.SystemStubs;
2626

2727
import java.time.Duration;
2828
import java.util.concurrent.TimeUnit;
2929

3030
import static org.assertj.core.api.Assertions.assertThat;
3131

32-
public class LgtmStackContainerTest {
32+
class LgtmStackContainerTest {
3333

3434
@Test
35-
public void shouldPublishMetricsTracesAndLogs() throws Exception {
35+
void shouldPublishMetricsTracesAndLogs() throws Exception {
3636
try ( // container {
3737
LgtmStackContainer lgtm = new LgtmStackContainer("grafana/otel-lgtm:0.11.1")
3838
// }

0 commit comments

Comments
 (0)