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

IHookable and IConfigurable callback discrepancy #2713

Merged
merged 1 commit into from Jan 19, 2022

Conversation

krmahadevan
Copy link
Member

@krmahadevan krmahadevan commented Jan 12, 2022

Closes #2704

Ensure that TestNG reports scenarios wherein
User defines callbacks for configurations/test methods
But fails to invoke those callbacks explicitly
And also fails in changing test status to a user
recognized status (PASS|FAILURE|SKIP)

Fixes #2704 .

Did you remember to?

  • Add test case(s)
  • Update CHANGES.txt
  • Auto applied styling via ./gradlew autostyleApply

We encourage pull requests that:

  • Add new features to TestNG (or)
  • Fix bugs in TestNG

If your pull request involves fixing SonarQube issues then we would suggest that you please discuss this with the
TestNG-dev before you spend time working on it.

Note: For more information on contribution guidelines please make sure you refer our Contributing section for detailed set of steps.

Copy link
Member

@juherr juherr left a comment

Choose a reason for hiding this comment

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

Really cool changes, good job! 👍

@krmahadevan
Copy link
Member Author

@juherr - I have fixed all the review comments. Please check.

@krmahadevan
Copy link
Member Author

@juherr - Fixed all review comments. Please check.

@krmahadevan
Copy link
Member Author

@juherr - Fixed and responded to your questions. Can you please help take a look

Closes testng-team#2704

Ensure that TestNG reports scenarios wherein 
User defines callbacks for configurations/test methods
But fails to invoke those callbacks explicitly 
And also fails in shipping test status to a user
recognized status (PASS|FAILURE|SKIP)
Copy link
Member

@juherr juherr left a comment

Choose a reason for hiding this comment

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

Except the exception flow which looks a bit complex to follow, LGTM

@krmahadevan krmahadevan merged commit a6f1c79 into testng-team:master Jan 19, 2022
@krmahadevan krmahadevan deleted the fix_2704 branch January 19, 2022 15:40
@lprimak
Copy link

lprimak commented Oct 28, 2022

This change broke Arquillian, see arquillian/arquillian-core#427

@lprimak
Copy link

lprimak commented Oct 28, 2022

In the future, these kinds of changes should bump up the major version.
This is not the only change that warrants a bump in major version (ex: JDK 11 requirement,)

@krmahadevan
Copy link
Member Author

In the future, these kinds of changes should bump up the major version.

This was a bug fix and the behaviour was being streamlined. Not sure why this would need a major version.

This is not the only change that warrants a bump in major version (ex: JDK 11 requirement,)

Feedback taken. Will ensure that when we change these sort of pre requisites we will do it as a major version and not as a minor version. Thank U for calling this out.

@juherr
Copy link
Member

juherr commented Oct 29, 2022

@krmahadevan Maybe we can make it configurable?

@lprimak Could you explain what is the use case which is failing with this fix? Even if we provide a workaround, don't you think there is an issue in the test suite?

@krmahadevan
Copy link
Member Author

@krmahadevan Maybe we can make it configurable?

Sure we can. But I would like to understand why do we need to do that, given the fact that this is undocumented behaviour and we were ensuring that we fixed the discrepancy.

@lprimak
Copy link

lprimak commented Oct 29, 2022

@lprimak Could you explain what is the use case which is failing with this fix? Even if we provide a workaround, don't you think there is an issue in the test suite?

See my original comment #2713 (comment)

The issue isn't that this PR is wrong (it's ok) but the behavior breakage is such that it should not have gone into a minor version upgrade.
I think Arquillian can be fixed to reflect the new (and better) behavior but again this isn't for a minor version bump in the future, that's all, since this is a breaking change

@juherr
Copy link
Member

juherr commented Nov 2, 2022

@lprimak In fact, we are not considering that a change of behavior is critical when it is not documented or it doesn't break our own test suite.
For sure, I can understand you disagree with that.

About the current subject, thanks to your feedback, we will provide a new key to configure this behavior.

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.

IHookable and IConfigurable callback discrepancy
3 participants