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 9be967d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
KAFKA_CONFLUENT_VERSION=7.5.0
KAFKA_CONFLUENT_VERSION=7.6.0
2 changes: 0 additions & 2 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
2 changes: 1 addition & 1 deletion radar-gateway/src/integrationTest/docker/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
KAFKA_CONFLUENT_VERSION=7.5.0
KAFKA_CONFLUENT_VERSION=7.6.0
RADAR_GATEWAY_TAG=SNAPSHOT
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 9be967d

Please sign in to comment.