From 4134ebccb7db047e99a796112a58d24095eb8171 Mon Sep 17 00:00:00 2001 From: Sheikah45 Date: Fri, 13 Oct 2023 20:59:55 -0400 Subject: [PATCH] Parallelize lobby tests --- faf-commons-lobby/build.gradle.kts | 2 ++ .../kotlin/com/faforever/commons/lobby/ClientMessageTest.kt | 3 +++ .../test/kotlin/com/faforever/commons/lobby/LobbyClientTest.kt | 3 +++ .../kotlin/com/faforever/commons/lobby/ServerMessageTest.kt | 3 +++ 4 files changed, 11 insertions(+) diff --git a/faf-commons-lobby/build.gradle.kts b/faf-commons-lobby/build.gradle.kts index 62ca19d7..471a242c 100644 --- a/faf-commons-lobby/build.gradle.kts +++ b/faf-commons-lobby/build.gradle.kts @@ -34,6 +34,8 @@ tasks.withType { showCauses = true showStackTraces = true } + + systemProperties["junit.jupiter.execution.parallel.enabled"] = true } tasks.withType { diff --git a/faf-commons-lobby/src/test/kotlin/com/faforever/commons/lobby/ClientMessageTest.kt b/faf-commons-lobby/src/test/kotlin/com/faforever/commons/lobby/ClientMessageTest.kt index 916d7df2..970085eb 100644 --- a/faf-commons-lobby/src/test/kotlin/com/faforever/commons/lobby/ClientMessageTest.kt +++ b/faf-commons-lobby/src/test/kotlin/com/faforever/commons/lobby/ClientMessageTest.kt @@ -5,8 +5,11 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule import com.fasterxml.jackson.module.kotlin.KotlinModule import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test +import org.junit.jupiter.api.parallel.Execution +import org.junit.jupiter.api.parallel.ExecutionMode import org.skyscreamer.jsonassert.JSONAssert +@Execution(ExecutionMode.CONCURRENT) class ClientMessageTest { companion object { diff --git a/faf-commons-lobby/src/test/kotlin/com/faforever/commons/lobby/LobbyClientTest.kt b/faf-commons-lobby/src/test/kotlin/com/faforever/commons/lobby/LobbyClientTest.kt index 9c797808..a65e0e82 100644 --- a/faf-commons-lobby/src/test/kotlin/com/faforever/commons/lobby/LobbyClientTest.kt +++ b/faf-commons-lobby/src/test/kotlin/com/faforever/commons/lobby/LobbyClientTest.kt @@ -13,6 +13,8 @@ import org.junit.jupiter.api.BeforeAll import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test +import org.junit.jupiter.api.parallel.Execution +import org.junit.jupiter.api.parallel.ExecutionMode import org.skyscreamer.jsonassert.JSONAssert import org.slf4j.Logger import org.slf4j.LoggerFactory @@ -31,6 +33,7 @@ import java.nio.charset.StandardCharsets import java.time.Duration import java.time.temporal.ChronoUnit +@Execution(ExecutionMode.CONCURRENT) class LobbyClientTest { companion object { val TIMEOUT: Long = 30; diff --git a/faf-commons-lobby/src/test/kotlin/com/faforever/commons/lobby/ServerMessageTest.kt b/faf-commons-lobby/src/test/kotlin/com/faforever/commons/lobby/ServerMessageTest.kt index 1f03bbca..b07e0e11 100644 --- a/faf-commons-lobby/src/test/kotlin/com/faforever/commons/lobby/ServerMessageTest.kt +++ b/faf-commons-lobby/src/test/kotlin/com/faforever/commons/lobby/ServerMessageTest.kt @@ -8,8 +8,11 @@ import com.fasterxml.jackson.module.kotlin.readValue import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test +import org.junit.jupiter.api.parallel.Execution +import org.junit.jupiter.api.parallel.ExecutionMode import java.time.OffsetDateTime +@Execution(ExecutionMode.CONCURRENT) class ServerMessageTest { companion object {