Skip to content

Commit

Permalink
Use junit BOM and org.junit.platform.launcher
Browse files Browse the repository at this point in the history
This allows the test suite to run without needing a workaround
to open modules.

Additionally, reduce the login delay for integration tests; reduces
build times from 13 minutes to 5 minutes.

Thanks @sormuras

Affects: junit-team/junit5#3810
  • Loading branch information
io7m committed May 12, 2024
1 parent d71d795 commit c0b6bbc
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ public static IdTestServerFixture create(
new IdServerRateLimitConfiguration(
Duration.ofMinutes(5L),
Duration.ofMinutes(5L),
Duration.ofSeconds(1L),
Duration.ofSeconds(1L),
Duration.ofSeconds(1L),
Duration.ofSeconds(1L)
Duration.ofMillis(1L),
Duration.ofMillis(3L),
Duration.ofMillis(1L),
Duration.ofMillis(3L)
);

return createWithRateLimitConfiguration(
Expand Down
14 changes: 14 additions & 0 deletions com.io7m.idstore.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
Expand All @@ -236,6 +237,19 @@
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-commons</artifactId>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-engine</artifactId>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
3 changes: 2 additions & 1 deletion com.io7m.idstore.tests/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,13 @@
requires org.postgresql.jdbc;
requires org.slf4j;
requires subethasmtp;
requires com.io7m.blackthorne.core;

requires org.junit.jupiter.api;
requires org.junit.jupiter.engine;
requires org.junit.platform.commons;
requires org.junit.platform.engine;
requires com.io7m.blackthorne.core;
requires org.junit.platform.launcher;

exports com.io7m.idstore.tests.database;
exports com.io7m.idstore.tests.integration;
Expand Down
11 changes: 4 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -591,14 +591,11 @@

<!-- Test suite -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${org.junit.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${org.junit.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>net.jqwik</groupId>
Expand Down

0 comments on commit c0b6bbc

Please sign in to comment.