Skip to content

Commit

Permalink
Fix integrationTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Bdegraaf1234 committed Jun 11, 2024
1 parent 64c47b9 commit 47d8859
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 1 addition & 3 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ object Versions {

const val ktor = "2.3.10"
const val radarJersey = "0.11.1"
const val radarCommons = "1.1.3-SNAPSHOT"
const val radarCommons = "1.1.2"
const val radarSchemas = "0.8.8"
const val jackson = "2.15.3"
const val slf4j = "2.0.13"
Expand All @@ -22,6 +22,4 @@ object Versions {
const val mockitoKotlin = "5.3.1"
const val grizzly = "4.0.2"
const val hamcrest = "2.2"

const val wrapper = "8.4"
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class KafkaTopicsTest {
}

val retriever = schemaRetriever(SCHEMA_REGISTRY_URL) {
httpClient {
httpClient = HttpClient(CIO) {
timeout(10.seconds)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import org.radarbase.gateway.config.GatewayConfig
import org.radarbase.producer.io.timeout
import org.radarbase.producer.schema.SchemaRetriever
import org.radarbase.producer.schema.SchemaRetriever.Companion.schemaRetriever
import org.slf4j.LoggerFactory
import java.util.function.Supplier
import kotlin.time.Duration.Companion.seconds

Expand All @@ -35,10 +34,10 @@ class SchemaRetrieverFactory(
?: config.kafka.serialization[USER_INFO_CONFIG].asNonEmptyString()

return schemaRetriever(baseUrl = server.urlString) {
if (basicCredentials != null && basicCredentials.contains(':')) {
val (apiKey, apiSecret) = basicCredentials.split(':', limit = 2)
httpClient = HttpClient(CIO) {
timeout(30.seconds)
httpClient = HttpClient(CIO) {
timeout(30.seconds)
if (basicCredentials != null && basicCredentials.contains(':')) {
val (apiKey, apiSecret) = basicCredentials.split(':', limit = 2)
install(Auth) {
basic {
sendWithoutRequest { true }
Expand All @@ -54,6 +53,5 @@ class SchemaRetrieverFactory(

companion object {
private fun Any?.asNonEmptyString(): String? = (this as? String)?.takeIf { it.isNotEmpty() }
private val logger = LoggerFactory.getLogger(SchemaRetrieverFactory::class.java)
}
}

0 comments on commit 47d8859

Please sign in to comment.