Skip to content

Commit 5f80a76

Browse files
fix ContainerFactory
1 parent 6c33833 commit 5f80a76

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=0.28.17
1+
version=0.28.18

airbyte-cdk/java/airbyte-cdk/core/src/testFixtures/kotlin/io/airbyte/cdk/extensions/LoggingInvocationInterceptor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ class LoggingInvocationInterceptor : InvocationInterceptor {
106106
if (timeoutTask.wasTriggered) {
107107
t1 =
108108
TimeoutException(
109-
"Execution was cancelled after %s. If you think your test should be given more time to complete, you can use the @Timeout annotation. If all the test of a connector are slow, " +
110-
" you can override the property 'JunitMethodExecutionTimeout' in your gradle.properties.".formatted(
109+
("Execution was cancelled after %s. If you think your test should be given more time to complete, you can use the @Timeout annotation. If all the test of a connector are slow, " +
110+
" you can override the property 'JunitMethodExecutionTimeout' in your gradle.properties.").formatted(
111111
DurationFormatUtils.formatDurationWords(elapsedMs, true, true)
112112
)
113113
)

airbyte-cdk/java/airbyte-cdk/core/src/testFixtures/kotlin/io/airbyte/cdk/testutils/ContainerFactory.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ import org.testcontainers.utility.DockerImageName
3030
abstract class ContainerFactory<C : GenericContainer<*>> {
3131
@JvmRecord
3232
private data class ContainerKey<C : GenericContainer<*>>(
33-
val clazz: Class<out ContainerFactory<*>?>?,
34-
val imageName: DockerImageName?,
35-
val methods: MutableList<out NamedContainerModifier<C>>
33+
val clazz: Class<out ContainerFactory<*>>,
34+
val imageName: DockerImageName,
35+
val methods: kotlin.collections.List<String>
3636
)
3737

3838
private class ContainerOrException(
@@ -110,7 +110,7 @@ abstract class ContainerFactory<C : GenericContainer<*>> {
110110
namedContainerModifiers: MutableList<out NamedContainerModifier<C>> = ArrayList()
111111
): C {
112112
val containerKey =
113-
ContainerKey<C>(javaClass, DockerImageName.parse(imageName), namedContainerModifiers)
113+
ContainerKey<C>(javaClass, DockerImageName.parse(imageName), namedContainerModifiers.map { it.name() }.toList())
114114
// We deliberately avoid creating the container itself eagerly during the evaluation of the
115115
// map
116116
// value.
@@ -119,7 +119,7 @@ abstract class ContainerFactory<C : GenericContainer<*>> {
119119
val containerOrError =
120120
SHARED_CONTAINERS!!.computeIfAbsent(containerKey) { key: ContainerKey<*>? ->
121121
ContainerOrException {
122-
createAndStartContainer(key!!.imageName, (key as ContainerKey<C>)!!.methods)
122+
createAndStartContainer(key!!.imageName, namedContainerModifiers)
123123
}
124124
}
125125
// Instead, the container creation (if applicable) is deferred to here.

0 commit comments

Comments
 (0)