-
Notifications
You must be signed in to change notification settings - Fork 3k
Migrate other files in Core to JUnit5 #10027
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
Conversation
|
@nastra Could you review this PR? Just let you know, the following two classes in
|
|
|
||
| @Rule public TemporaryFolder temp = new TemporaryFolder(); | ||
| private Table table = null; | ||
| // @Rule public TemporaryFolder temp = new TemporaryFolder(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Remove this comment.
| .allManifests(table.io()) | ||
| .get(0) | ||
| .path(), // manifest contained only deletes, was dropped | ||
| FILE_A.path().toString() // deleted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is toString() needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed. Remove toString() here.
| .get(0) | ||
| .path(), // manifest was rewritten for delete | ||
| secondSnapshot.manifestListLocation(), // snapshot expired | ||
| FILE_A.path())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
original comment is missing here: // deleted
| .isEqualTo( | ||
| Sets.newHashSet( | ||
| secondSnapshot.manifestListLocation(), // snapshot expired | ||
| Iterables.getOnlyElement(secondSnapshotManifests) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we avoid using Iterables here?
| assertThat(table.currentSnapshot()).isEqualTo(thirdSnapshot); | ||
| assertThat(table.snapshots()).hasSize(1); | ||
| assertThat(deletedFiles) | ||
| .isEqualTo( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.containsExactly()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order of firstSnapshot.manifestLocation and secondSnapshot.manifestLocation depends on the hashset values, so the order is not always the same. So, I believe this part needs to use isEqualTo, or containsExactlyInAnyOrder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use containsExactlyInAnyOrder then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, thank you!
You mean migrated in a separate PR? Also I see a few more files in |
I will submit a PR for the two classes There are also some files to be migrated in some sub-packages (like |
0cdeef9 to
2543b29
Compare

Migrate the following test classes in iceberg-core to JUnit 5 and AssertJ style for #9085.
Current Progress
TestMetricsModes.javaTestMicroBatchBuilder.javaTestRemoveSnapshots.javaTestRewriteManifests.javaTestRowDelta.javaTestSequenceNumberForV2Table.javaTestSingleValueParser.javaTestSortOrder.javaTestSortOrderParser.javaTestSplitPlanning.javaTestV1ToV2RowDeltaDelete.javaV2TableTestBase.javaRefactoring (related to #10014 (comment)):
TestSchemaAndMappingUpdate.javaTestSchemaUpdate