Skip to content

Commit

Permalink
Use RecordWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsimsek committed Oct 5, 2024
1 parent 3c678ea commit 524ee88
Showing 1 changed file with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import io.debezium.server.iceberg.testresources.SourcePostgresqlDB;
import io.quarkus.test.common.WithTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.QuarkusTestProfile;
import io.quarkus.test.junit.TestProfile;
import jakarta.inject.Inject;
import org.apache.iceberg.Table;
import org.apache.iceberg.catalog.Namespace;
Expand All @@ -27,7 +29,9 @@
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import static org.apache.iceberg.TableProperties.DEFAULT_FILE_FORMAT;
import static org.apache.iceberg.TableProperties.DEFAULT_FILE_FORMAT_DEFAULT;
Expand All @@ -40,7 +44,7 @@
*/
@QuarkusTest
@WithTestResource(value = S3Minio.class)
@WithTestResource(value = SourcePostgresqlDB.class)
@TestProfile(IcebergTableOperatorTest.TestProfile.class)
class IcebergTableOperatorTest extends BaseSparkTest {

static String testTable = "inventory.test_table_operator";
Expand Down Expand Up @@ -179,4 +183,16 @@ public void testDeduplicateBatch() throws Exception {

Assertions.assertTrue(thrown.getMessage().contains("Cannot deduplicate data with null key!"));
}
}
public static class TestProfile implements QuarkusTestProfile {
@Override
public Map<String, String> getConfigOverrides() {
Map<String, String> params = new HashMap<>();
params.put("debezium.source.database.hostname", "test");
params.put("debezium.source.database.port", "4321");
params.put("debezium.source.database.user", "test");
params.put("debezium.source.database.password", "test");
params.put("debezium.source.database.dbname", "test");
return params;
}
}
}

0 comments on commit 524ee88

Please sign in to comment.