Skip to content
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

Use a mocked version of JenkinsLocationConfiguration in tests #252

Conversation

darxriggs
Copy link
Collaborator

Otherwise its constructor calls load() which results in a NullPointerException because it tries to access the ServletContext which is not available in tests.

This exception did not affect the test results but was confusing when looking at the test outputs.

Otherwise its constructor calls `load()` which results in a `NullPointerException`
because it tries to access the `ServletContext` which is not available in tests.

This exception did not affect the test results but was confusing
when looking at the test outputs.
@scaytrase
Copy link
Member

Thanks @darxriggs !

@scaytrase scaytrase merged commit bdf82ad into jenkinsci:release/1.x Jan 5, 2020
@darxriggs darxriggs deleted the fix-NullPointerExceptions-in-tests branch January 5, 2020 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants