Skip to content

Commit

Permalink
minimize
Browse files Browse the repository at this point in the history
  • Loading branch information
fqaiser94 committed Apr 9, 2024
1 parent 645f5da commit d1834ab
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ jobs:
- name: Build & Test java services
uses: gradle/[email protected]
with:
arguments: clean build
arguments: iceberg-kafka-connect-runtime:test --tests io.tabular.iceberg.connect.IntegrationCdcTest
Original file line number Diff line number Diff line change
Expand Up @@ -61,32 +61,32 @@ public void after() {
((SupportsNamespaces) catalog).dropNamespace(Namespace.of(TEST_DB));
}

@ParameterizedTest
@NullSource
@ValueSource(strings = "test_branch")
public void testIcebergSinkPartitionedTable(String branch) {
catalog.createTable(
TABLE_IDENTIFIER, TEST_SCHEMA, TEST_SPEC, ImmutableMap.of(FORMAT_VERSION, "2"));

boolean useSchema = branch == null; // use a schema for one of the tests
runTest(branch, useSchema);

List<DataFile> files = dataFiles(TABLE_IDENTIFIER, branch);
// partition may involve 1 or 2 workers
assertThat(files).hasSizeBetween(2, 3);
assertThat(files.stream().mapToLong(DataFile::recordCount).sum()).isEqualTo(4);

List<DeleteFile> deleteFiles = deleteFiles(TABLE_IDENTIFIER, branch);
// partition may involve 1 or 2 workers
assertThat(files).hasSizeBetween(2, 3);
assertThat(deleteFiles.stream().mapToLong(DeleteFile::recordCount).sum()).isEqualTo(2);

assertSnapshotProps(TABLE_IDENTIFIER, branch);
}
// @ParameterizedTest
// @NullSource
// @ValueSource(strings = "test_branch")
// public void testIcebergSinkPartitionedTable(String branch) {
// catalog.createTable(
// TABLE_IDENTIFIER, TEST_SCHEMA, TEST_SPEC, ImmutableMap.of(FORMAT_VERSION, "2"));
//
// boolean useSchema = branch == null; // use a schema for one of the tests
// runTest(branch, useSchema);
//
// List<DataFile> files = dataFiles(TABLE_IDENTIFIER, branch);
// // partition may involve 1 or 2 workers
// assertThat(files).hasSizeBetween(2, 3);
// assertThat(files.stream().mapToLong(DataFile::recordCount).sum()).isEqualTo(4);
//
// List<DeleteFile> deleteFiles = deleteFiles(TABLE_IDENTIFIER, branch);
// // partition may involve 1 or 2 workers
// assertThat(files).hasSizeBetween(2, 3);
// assertThat(deleteFiles.stream().mapToLong(DeleteFile::recordCount).sum()).isEqualTo(2);
//
// assertSnapshotProps(TABLE_IDENTIFIER, branch);
// }

@ParameterizedTest
@NullSource
@ValueSource(strings = "test_branch")
// @ValueSource(strings = "test_branch")
public void testIcebergSinkUnpartitionedTable(String branch) {
catalog.createTable(TABLE_IDENTIFIER, TEST_SCHEMA, null, ImmutableMap.of(FORMAT_VERSION, "2"));

Expand Down

0 comments on commit d1834ab

Please sign in to comment.