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

Fix for ignored runtime exception in runner.run() method #184

Merged
merged 2 commits into from
Oct 17, 2018

Conversation

mpiotrowski-im
Copy link
Contributor

Short description of what this resolves:

I would like to propose a fix for a problem that when there is a runtime exception or error while running runner.run() method in TestNGRunner, the problem is ignored.

If someone omits required runtime class in a deployment archive there will be ClassDefNotFoundError when executing run() method in TestNGRunner. Arquillian servlet will return HTTP code 500 which is ignored in servlet protocol runner and consequently returned as a test which passed. But in reality the test did not even run and should be marked as failed.

Changes proposed in this pull request:

I propose a fix which catches runtime exceptions and errors while executing runner.run() method and envelope it in TestResult.failed() so it is reported as failed test.

…runner.run() method

there is returned HTTP 500 error code to servlet protocol runner which is ignored
and consequently returned as a test which passed.
This problem can occur when deployed test is missing a runtime dependency
and there will be ClassDefNotFoundError when executing run() method.
Copy link
Member

@bartoszmajsak bartoszmajsak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @mpiotrowski-im so much for this small, but very important fix. I will release new version today 🎆 🥇

@bartoszmajsak bartoszmajsak merged commit b95a66e into arquillian:master Oct 17, 2018
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.

None yet

2 participants