-
Notifications
You must be signed in to change notification settings - Fork 98
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
Trivial code cleanup for tests #114
Conversation
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 ok to me, thanks!
@@ -126,52 +114,6 @@ | |||
}); | |||
} | |||
|
|||
/** Ephemeral and deleted when it disconnects */ | |||
static class EphemeralDumbAgent extends Slave implements EphemeralNode { |
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.
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.
// Ensure deleted | ||
f1.delete(); | ||
// Ensure file does not exist | ||
assertFalse(Files.exists(f1)); |
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.
Did the old behavior matter if this plugin's test were being run in the same workspace more than once? I guess you could use Files.deleteIfExists(f1)
to preserve the old behavior, but I'm not sure what the original concern was.
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 too was having a hard time understanding the original behavior. Your explanation is as good as any, so we might as well preserve the existing functionality. I switched to Files.deleteIfExists
and updated the comment to reflect your explanation.
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, I'll merge once the CI build passes (ping me if it completes and it looks like I forgot about it 😄).
The Windows agent was broken, rebuilding. |
Another |
I think this should be good to go now. |
A series of trivial code cleanup changes for the tests in this repository. Most of these changes remove usages of deprecated functionality or otherwise fix IDE warnings. I kept each commit separate. Each commit message should be self-explanatory, but if anything is unclear I am happy to provide further explanation. Also, feel free to revert any specific cleanup commits that are unwanted.