Skip to content

IHookable and IConfigurable callback discrepancy - #2713

Merged
krmahadevan merged 1 commit into
testng-team:masterfrom
krmahadevan:fix_2704
Jan 19, 2022
Merged

krmahadevan merged 1 commit into
testng-team:masterfrom
krmahadevan:fix_2704

Conversation

@krmahadevan

@krmahadevan krmahadevan commented Jan 12, 2022 •

Copy link
Copy Markdown
Member

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.

@krmahadevan
krmahadevan requested a review from juherr January 12, 2022 11:31

@juherr juherr left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

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

@krmahadevan

Copy link
Copy Markdown
Member Author

@juherr - Fixed all review comments. Please check.

@krmahadevan

Copy link
Copy Markdown
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)

@juherr juherr left a comment

Copy link
Copy Markdown
Member

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

lprimak commented Oct 28, 2022

Copy link
Copy Markdown

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

@lprimak

lprimak commented Oct 28, 2022

Copy link
Copy Markdown

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
Copy Markdown
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

juherr commented Oct 29, 2022

Copy link
Copy Markdown
Member

@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
Copy Markdown
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

lprimak commented Oct 29, 2022 •

Copy link
Copy Markdown

@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

juherr commented Nov 2, 2022

Copy link
Copy Markdown
Member

@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