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

ListenerComparator doesn't work #3117

Closed
SergiyBelevitnevSFLY opened this issue Apr 25, 2024 · 4 comments · Fixed by #3118
Closed

ListenerComparator doesn't work #3117

SergiyBelevitnevSFLY opened this issue Apr 25, 2024 · 4 comments · Fixed by #3118

Comments

@SergiyBelevitnevSFLY
Copy link

SergiyBelevitnevSFLY commented Apr 25, 2024

TestNG Version

7.10.1

Expected behavior

ListenerComparator should order listeners

Actual behavior

ListenerComparator doesn't order listeners

Test case sample

<properties>
  <property>
    <name>listenercomparator</name>
    <value>base.listeners.order.AnnotationBackedListenerComparator</value>
  </property>
  <property>
    <name>listener</name>
    <value>base.listeners.ReportPortalListenerOverwritten, 
      base.listeners.AttachFilesListener, base.listeners.TestRailListener, base.listeners.MixPanelListener
    </value>
  </property>
</properties>

Contribution guidelines

I tried many combinations but had no success. Listeners still are starting without any order

@krmahadevan krmahadevan added this to the 7.11.0 milestone Apr 28, 2024
krmahadevan added a commit to krmahadevan/testng that referenced this issue Apr 28, 2024
Closes testng-team#3117

The listener comparator was NOT getting wired in 
when specified as a property in maven surefire plugin.
@krmahadevan
Copy link
Member

@SergiyBelevitnevSFLY - Thank you so much for filing this issue. This was a miss in the feature implementation. I have raised a PR for fixing this.

krmahadevan added a commit that referenced this issue Apr 28, 2024
Closes #3117

The listener comparator was NOT getting wired in 
when specified as a property in maven surefire plugin.
@krmahadevan krmahadevan modified the milestones: 7.11.0, 7.10.2 Apr 28, 2024
@krmahadevan
Copy link
Member

@SergiyBelevitnevSFLY - This is now fixed and released as part of TestNG 7.10.2.

https://repo1.maven.org/maven2/org/testng/testng/7.10.2/

@krmahadevan
Copy link
Member

@missedone - I had to release TestNG v7.10.2 to include the fix for this bug.

@SergiyBelevitnevSFLY
Copy link
Author

I have checked the code against TestNG v7.10.2 and can confirm that the issue has been resolved. I am grateful for the feature delivery!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants