Skip to content

Commit f1d6bbd

Browse files
committed
fixup! Introduce Kotlin integration tests
Signed-off-by: Sergey Karpov <[email protected]>
1 parent 31ce9f0 commit f1d6bbd

File tree

1 file changed

+3
-7
lines changed
  • kotlin-sdk-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/utils

1 file changed

+3
-7
lines changed

kotlin-sdk-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/utils/Retry.kt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@ import org.junit.jupiter.api.extension.InvocationInterceptor
66
import org.junit.jupiter.api.extension.InvocationInterceptor.Invocation
77
import org.junit.jupiter.api.extension.ReflectiveInvocationContext
88
import org.opentest4j.TestAbortedException
9-
import java.lang.annotation.Inherited
109
import java.lang.reflect.AnnotatedElement
1110
import java.lang.reflect.Method
1211
import java.util.*
1312

14-
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
13+
@Target(AnnotationTarget.CLASS)
1514
@Retention(AnnotationRetention.RUNTIME)
16-
@Inherited
1715
@ExtendWith(RetryExtension::class)
1816
annotation class Retry(
1917
val times: Int = 3,
20-
val delayMs: Long = 0,
18+
val delayMs: Long = 1000,
2119
)
2220

2321
class RetryExtension : InvocationInterceptor {
@@ -30,8 +28,6 @@ class RetryExtension : InvocationInterceptor {
3028
}
3129

3230
private fun resolveRetryAnnotation(extensionContext: ExtensionContext): Retry? {
33-
val methodAnn = extensionContext.testMethod.flatMap { findRetry(it) }
34-
if (methodAnn.isPresent) return methodAnn.get()
3531
val classAnn = extensionContext.testClass.flatMap { findRetry(it) }
3632
return classAnn.orElse(null)
3733
}
@@ -90,4 +86,4 @@ class RetryExtension : InvocationInterceptor {
9086
val className = ctx.testClass.map { it.name }.orElse("<unknown>")
9187
return "$className#$methodName"
9288
}
93-
}
89+
}

0 commit comments

Comments
 (0)