-
Notifications
You must be signed in to change notification settings - Fork 1k
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
After methods should be skipped when exclusion used #1575
base: master
Are you sure you want to change the base?
Conversation
de2936f
to
d472bc9
Compare
@@ -275,6 +275,10 @@ private static boolean isIncluded(Collection<String> includedGroups, boolean noG | |||
} | |||
|
|||
private static boolean isExcluded(Collection<String> excludedGroups, String... groups) { | |||
boolean noGroups = (groups == null || groups.length == 0); |
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.
groups cannot be null.
test.addExcludedGroup("sometest"); | ||
TestNG testng = create(suite); | ||
testng.run(); | ||
assertThat(Issue1574TestclassSample.messages).containsExactly("anothertest","@AfterSuite"); |
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.
Typo: space missing after ','
import java.util.List; | ||
|
||
public class Issue1574TestclassSample { | ||
public static List<String> messages = Lists.newArrayList(); |
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.
Prefer to use InvokedMethodNameListener when possible.
d472bc9
to
afc8a1b
Compare
@juherr - I have amended the commit and fixed all the comments. Please help take a look |
ping @juherr - Gentle reminder.. |
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.
The code is ok but I think it doesn't solve any issue.
@cbeust Could you check #1574 (comment)
@@ -275,6 +275,9 @@ private static boolean isIncluded(Collection<String> includedGroups, boolean noG | |||
} | |||
|
|||
private static boolean isExcluded(Collection<String> excludedGroups, String... groups) { | |||
if (!excludedGroups.isEmpty() && groups.length ==0) { |
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.
Typo: space missing after '=='
afc8a1b
to
ffe1505
Compare
ping @cbeust - Can you please help comment on this here : #1574 (comment) I would like to either close this PR if its not a bug or get this merged if its a bug. Please advise. |
ffe1505
to
0048a83
Compare
Closes testng-team#1574 Suppose there are one or more configuration methods which don’t belong to any group and for which “alwaysRun” attribute is not set, and when the user specifies a valid exclusion list for groups, TestNG would still execute those configuration methods. Fixed this anomaly.
0048a83
to
324bb80
Compare
Closes #1574
Suppose there are one or more configuration methods
which don’t belong to any group and for which “alwaysRun”
attribute is not set, and when the user specifies
a valid exclusion list for groups, TestNG would still
execute those configuration methods.
Fixed this anomaly.
Fixes #1574 .
Did you remember to?
CHANGES.txt
We encourage pull requests that:
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.