Skip to content

Commit 01f2d5c

Browse files
committed
Fix StreamLoader tests
1 parent c4734a2 commit 01f2d5c

File tree

1 file changed

+4
-9
lines changed
  • airbyte-integrations/connectors/destination-s3-data-lake/src/test/kotlin/io/airbyte/integrations/destination/s3_data_lake

1 file changed

+4
-9
lines changed

airbyte-integrations/connectors/destination-s3-data-lake/src/test/kotlin/io/airbyte/integrations/destination/s3_data_lake/S3DataLakeStreamLoaderTest.kt

+4-9
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import io.airbyte.cdk.load.command.s3.S3BucketConfiguration
1414
import io.airbyte.cdk.load.command.s3.S3BucketRegion
1515
import io.airbyte.cdk.load.data.FieldType
1616
import io.airbyte.cdk.load.data.IntegerType
17-
import io.airbyte.cdk.load.data.MapperPipeline
1817
import io.airbyte.cdk.load.data.ObjectType
1918
import io.airbyte.cdk.load.data.StringType
2019
import io.airbyte.cdk.load.data.iceberg.parquet.toIcebergSchema
@@ -148,8 +147,7 @@ internal class S3DataLakeStreamLoaderTest {
148147
every { createTable(any(), any(), any(), any()) } returns table
149148
every { toIcebergSchema(any()) } answers
150149
{
151-
val pipeline = secondArg() as MapperPipeline
152-
pipeline.finalSchema.withAirbyteMeta(true).toIcebergSchema(emptyList())
150+
stream.schema.withAirbyteMeta(true).toIcebergSchema(emptyList())
153151
}
154152
}
155153
val streamLoader =
@@ -245,8 +243,7 @@ internal class S3DataLakeStreamLoaderTest {
245243
every { createTable(any(), any(), any(), any()) } returns table
246244
every { toIcebergSchema(any()) } answers
247245
{
248-
val pipeline = secondArg() as MapperPipeline
249-
pipeline.finalSchema.withAirbyteMeta(true).toIcebergSchema(emptyList())
246+
stream.schema.withAirbyteMeta(true).toIcebergSchema(emptyList())
250247
}
251248
every { constructGenerationIdSuffix(any() as Long) } returns ""
252249
every { assertGenerationIdSuffixIsOfValidFormat(any()) } just runs
@@ -396,8 +393,7 @@ internal class S3DataLakeStreamLoaderTest {
396393
every { createTable(any(), any(), any(), any()) } returns table
397394
every { toIcebergSchema(any()) } answers
398395
{
399-
val pipeline = secondArg() as MapperPipeline
400-
pipeline.finalSchema.withAirbyteMeta(true).toIcebergSchema(listOf(primaryKeys))
396+
stream.schema.withAirbyteMeta(true).toIcebergSchema(listOf(primaryKeys))
401397
}
402398
every { constructGenerationIdSuffix(any() as Long) } returns ""
403399
every { assertGenerationIdSuffixIsOfValidFormat(any()) } just runs
@@ -454,8 +450,7 @@ internal class S3DataLakeStreamLoaderTest {
454450
val icebergUtil: IcebergUtil = mockk {
455451
every { toIcebergSchema(any()) } answers
456452
{
457-
val pipeline = secondArg() as MapperPipeline
458-
pipeline.finalSchema.withAirbyteMeta(true).toIcebergSchema(emptyList())
453+
stream.schema.withAirbyteMeta(true).toIcebergSchema(emptyList())
459454
}
460455
}
461456
val streamLoader =

0 commit comments

Comments
 (0)