WSS 테스트가 반복 실행과 전체 테스트에서 간헐적으로 timeout 되던 원인을 닫기 위해 client/server close 소유권과 테스트 TLS 설정을 정리한다.
74 lines
1.7 KiB
Text
74 lines
1.7 KiB
Text
plugins {
|
|
kotlin("jvm") version "2.0.0"
|
|
application
|
|
id("com.google.protobuf") version "0.9.4"
|
|
}
|
|
|
|
group = "com.tokilabs"
|
|
version = "1.0.5"
|
|
|
|
kotlin {
|
|
jvmToolchain(17)
|
|
}
|
|
|
|
sourceSets {
|
|
create("crosstest") {
|
|
kotlin.srcDir("crosstest")
|
|
compileClasspath += sourceSets["main"].output + configurations["runtimeClasspath"]
|
|
runtimeClasspath += output + compileClasspath
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
target {
|
|
val main = compilations.getByName("main")
|
|
compilations.getByName("crosstest") {
|
|
associateWith(main)
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")
|
|
implementation("com.google.protobuf:protobuf-kotlin:4.27.0")
|
|
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
|
implementation("org.java-websocket:Java-WebSocket:1.5.6")
|
|
|
|
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.1")
|
|
testImplementation(kotlin("test"))
|
|
}
|
|
|
|
protobuf {
|
|
protoc {
|
|
artifact = "com.google.protobuf:protoc:4.27.0"
|
|
}
|
|
generateProtoTasks {
|
|
all().forEach { task ->
|
|
task.builtins {
|
|
create("kotlin")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
application {
|
|
mainClass.set(
|
|
(findProperty("mainClass") as String?)
|
|
?: "com.tokilabs.proto_socket.crosstest.MainKt",
|
|
)
|
|
}
|
|
|
|
val crosstestSourceSet = sourceSets["crosstest"]
|
|
|
|
tasks.named<JavaExec>("run") {
|
|
classpath = crosstestSourceSet.runtimeClasspath
|
|
mainClass.set(
|
|
(findProperty("mainClass") as String?)
|
|
?: "com.tokilabs.proto_socket.crosstest.MainKt",
|
|
)
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
systemProperty("java.security.egd", "file:/dev/./urandom")
|
|
}
|