-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8360411: [TEST] open/test/jdk/java/io/File/MaxPathLength.java Refactor extract method to encapsulate Windows specific test logic #26193
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
base: master
Are you sure you want to change the base?
Conversation
… extract method to encapsulate Windows specific
Hi @DarraghConway, welcome to this OpenJDK project and thanks for contributing! We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user DarraghConway" as summary for the issue. If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing |
❗ This change is not yet ready to be integrated. |
@DarraghConway The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
/covered |
Thank you! Please allow for a few business days to verify that your employer has signed the OCA. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated! |
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.
Looks good, just a minor comment
if (isWindows) { | ||
String name = fileName; | ||
while (name.length() < MAX_LENGTH) { | ||
testLongPath (20, name, false); |
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.
Nitpick: do you think there is a need for a space before the (
? Looks odd imo. But as the whole file uses this, I'm fine with you leaving this as is
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.
Yeah, was just being coherent
while (name.length() < MAX_LENGTH) { | ||
testLongPath (20, name, false); | ||
testLongPath (20, name, true); | ||
name = getNextName(name); |
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.
Name doesn't seem to be used after. Do you think it might be beneficial to add an assert here to check if the result is the same as expected ?
Same applies to the main method
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.
I agree it would be beneficial.
Would this be a valid assert to add after those while loops?
assert name.length() >= MAX_LENGTH : "Unexpected final name length: " + name.length();
Refactored extract method to encapsulate Windows specific test logic
Progress
Error
Integration blocker
8360411
. Please make sure it exists and is accessible.Issue
8360411
.Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26193/head:pull/26193
$ git checkout pull/26193
Update a local copy of the PR:
$ git checkout pull/26193
$ git pull https://git.openjdk.org/jdk.git pull/26193/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26193
View PR using the GUI difftool:
$ git pr show -t 26193
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26193.diff