-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add jdbc catalog test * Add jdbc catalog test * Add jdbc catalog test * Add jdbc catalog test
- Loading branch information
1 parent
83afc6a
commit 6e8909b
Showing
8 changed files
with
84 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...g-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerJdbcCatalogTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* | ||
* * Copyright memiiso Authors. | ||
* * | ||
* * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
*/ | ||
|
||
package io.debezium.server.iceberg; | ||
|
||
import com.google.common.collect.Lists; | ||
import io.debezium.server.iceberg.testresources.BaseTest; | ||
import io.debezium.server.iceberg.testresources.CatalogJdbc; | ||
import io.debezium.server.iceberg.testresources.S3Minio; | ||
import io.debezium.server.iceberg.testresources.SourcePostgresqlDB; | ||
import io.quarkus.test.common.QuarkusTestResource; | ||
import io.quarkus.test.junit.QuarkusTest; | ||
import org.apache.iceberg.data.Record; | ||
import org.apache.iceberg.io.CloseableIterable; | ||
import org.awaitility.Awaitility; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.time.Duration; | ||
|
||
/** | ||
* Integration test that verifies basic reading from PostgreSQL database and writing to iceberg destination. | ||
* | ||
* @author Ismail Simsek | ||
*/ | ||
@QuarkusTest | ||
@QuarkusTestResource(value = S3Minio.class, restrictToAnnotatedClass = true) | ||
@QuarkusTestResource(value = SourcePostgresqlDB.class, restrictToAnnotatedClass = true) | ||
@QuarkusTestResource(value = CatalogJdbc.class, restrictToAnnotatedClass = true) | ||
public class IcebergChangeConsumerJdbcCatalogTest extends BaseTest { | ||
|
||
@Test | ||
public void testSimpleUpload() { | ||
Awaitility.await().atMost(Duration.ofSeconds(120)).until(() -> { | ||
try { | ||
CloseableIterable<Record> result = getTableDataV2("testc.inventory.customers"); | ||
return Lists.newArrayList(result).size() >= 3; | ||
} catch (Exception e) { | ||
return false; | ||
} | ||
}); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters