Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ChannelTestBase to replace mocks #203

Merged
merged 1 commit into from
Mar 11, 2024
Merged

Conversation

fqtab
Copy link
Contributor

@fqtab fqtab commented Mar 6, 2024

Refactoring ChannelTestBase to use "real" catalog and table implementations rather than mocks.
In my next PR, I have to use iceberg's transaction functionality and mocking out that functionality didn't seem worth it.

@fqtab fqtab changed the title Refactor channel test base to remove mocks Refactor ChannelTestBase to replace mocks Mar 6, 2024
@fqtab fqtab marked this pull request as ready for review March 6, 2024 20:54
@@ -65,9 +65,9 @@ public void testCommitResponseSerialization() {
assertThat(payload.commitId()).isEqualTo(commitId);
assertThat(payload.tableName().toIdentifier()).isEqualTo(TableIdentifier.parse("db.tbl"));
assertThat(payload.dataFiles()).hasSize(2);
assertThat(payload.dataFiles()).allMatch(f -> f.specId() == 1);
assertThat(payload.dataFiles()).allMatch(f -> f.specId() == 0);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for posterity's sake, this change is because the createDataFile function now creates files with unpartitioned spec.

null,
null,
1);
return DataFiles.builder(PartitionSpec.unpartitioned())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as can be seen here.

@fqtab fqtab merged commit db151be into main Mar 11, 2024
2 checks passed
@fqtab fqtab deleted the refactor_channel_test_base branch March 11, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants