Skip to content

Commit 434adfd

Browse files
committed
[a2a] Make integration tests single threaded
1 parent 93577d6 commit 434adfd

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

a2a/a2a-client/src/jvmTest/kotlin/ai/koog/a2a/client/A2AClientJsonRpcIntegrationTest.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import org.junit.jupiter.api.BeforeAll
1111
import org.junit.jupiter.api.TestInstance
1212
import org.junit.jupiter.api.condition.EnabledOnOs
1313
import org.junit.jupiter.api.condition.OS
14+
import org.junit.jupiter.api.parallel.Execution
15+
import org.junit.jupiter.api.parallel.ExecutionMode
1416
import org.testcontainers.containers.GenericContainer
1517
import org.testcontainers.containers.wait.strategy.Wait
1618
import org.testcontainers.junit.jupiter.Container
@@ -25,6 +27,7 @@ import kotlin.time.Duration.Companion.minutes
2527
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
2628
@Testcontainers
2729
@EnabledOnOs(OS.LINUX)
30+
@Execution(ExecutionMode.SAME_THREAD, reason = "Working with the same instance of test server.")
2831
class A2AClientJsonRpcIntegrationTest : BaseA2AProtocolTest() {
2932
companion object {
3033
@Container
@@ -34,7 +37,7 @@ class A2AClientJsonRpcIntegrationTest : BaseA2AProtocolTest() {
3437
.waitingFor(Wait.forListeningPort())
3538
}
3639

37-
override val testTimeout = 2.minutes
40+
override val testTimeout = 1.minutes
3841

3942
private val httpClient = HttpClient {
4043
install(Logging) {

a2a/a2a-server/src/jvmTest/kotlin/ai/koog/a2a/server/A2AServerJsonRpcIntegrationTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ import kotlinx.coroutines.withContext
4545
import org.junit.jupiter.api.AfterAll
4646
import org.junit.jupiter.api.BeforeAll
4747
import org.junit.jupiter.api.TestInstance
48+
import org.junit.jupiter.api.parallel.Execution
49+
import org.junit.jupiter.api.parallel.ExecutionMode
4850
import java.net.ServerSocket
4951
import kotlin.test.BeforeTest
5052
import kotlin.test.Test
@@ -59,6 +61,7 @@ import kotlin.uuid.Uuid
5961
*/
6062
@OptIn(ExperimentalUuidApi::class)
6163
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
64+
@Execution(ExecutionMode.SAME_THREAD, reason = "Working with the same instance of test server.")
6265
class A2AServerJsonRpcIntegrationTest : BaseA2AProtocolTest() {
6366
override val testTimeout = 2.minutes
6467

0 commit comments

Comments
 (0)