-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[HUDI-4780] Improve test setup #6704
Conversation
同步 hudi master
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.
@loukey-lj does this add a test for #6602 (HUDI-4780)?
yes |
FileSystem fileSystemOriginal = MiniClusterUtil.fileSystem; | ||
|
||
assertTrue(fs.mkdirs(new Path(tempDir.toAbsolutePath().toString()))); | ||
assertTrue(fileSystemOriginal.mkdirs(new Path(tempDir.toAbsolutePath().toString()))); | ||
this.partitionPath = new Path(tempDir.toAbsolutePath().toString()); | ||
this.basePath = tempDir.getParent().toString(); | ||
HoodieTestUtils.init(MiniClusterUtil.configuration, basePath, HoodieTableType.MERGE_ON_READ); | ||
HoodieTableMetaClient init = HoodieTestUtils.init(MiniClusterUtil.configuration, basePath, HoodieTableType.MERGE_ON_READ); | ||
this.fs = init.getFs(); |
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.
@loukey-lj Could you clarify how the changes improve the tests for #6602 you put up?
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.
In the actual running process fs comes from TableMateClinet.So I initialized a TableMateClinetto get fs instead of fileSystemOriginal.
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.
Got it. Could you point out which set of tests fail without your previous fix (#6602) after this PR? We should add some comments on these tests mentioning that they test the logic around creating new log files based the size configured. If there are no such test, we should add one. Let me know if this makes sense. We can sync up through Hudi Slack.
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 you clarify what improvement this brings? does it solve any flakiness? this does not warrant a new jira. please use the same jira ticket. also please fill the PR description according to the template
@loukey-lj : is this patch still valid ? can you respond to Ethan's and raymond's clarification above. |
On the latest master, the file system instance is already instantiated properly in the setup of |
Change Logs
this pr supplements the 6602 test case.
TestHoodieLogFormat initialization of fs is inconsistent with the actual running code, this is why the test code is as expected, but the log file is not segmented when actually running.
Impact
Correct the test code to align the test case with the actual running code
Contributor's checklist