-
Notifications
You must be signed in to change notification settings - Fork 381
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
Migrating Tests From JUnit 3 (GitAPITesCase) to JUnit 4 (GitAPITest) #678
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.
Approved with two optional comments. Will merge in 24 hours unless you tell me you need more time based on the optional comments.
// workspace = new WorkspaceWithRepo(repoRoot, gitImplName, listener); | ||
// workspace = new WorkspaceWithRepo(temporaryDirectoryAllocator.allocate(), gitImplName, listener); |
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.
Since repoRoot has been removed above, it would be good to remove it here as well.
// workspace = new WorkspaceWithRepo(repoRoot, gitImplName, listener); | |
// workspace = new WorkspaceWithRepo(temporaryDirectoryAllocator.allocate(), gitImplName, listener); |
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.
Yes, you're actually I missed out this one when removing. Will complete it, but need some time.
assertFixSubmoduleUrlsThrows(); | ||
} | ||
|
||
public void assertFixSubmoduleUrlsThrows() throws InterruptedException { |
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.
If you're willing, I'm curious if this could be converted to use the JUnit 4 ExpectedException
rather than try / catch / fail. I'm also OK if you decide that it is not worth the effort to make that transition at this time.
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 will try for it. And let you know. I need to look into documentation of ExpectedException
of JUnit 4.
@MarkEWaite Should I also change other Exception assertions to |
@GAyan17 if you can make that conversion, I think it is a very good change. |
Okay, with the remaining tests I'll also try to eventually convert those exception assertions to |
Thanks very much! |
JENKINS-60940 - Migrating Tests From JUnit 3 (GitAPITesCase) to JUnit 4 (GitAPITest)
Migrated few of the Tests which are for only CLI Git.
Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. This is simply a reminder of what we are going to look for before merging your code.Types of changes
What types of changes does your code introduce? Put an
x
in the boxes that applyFurther comments
If this is a relatively large or complex change, start the discussion by explaining why you chose the solution you did and what alternatives you considered.