-
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
Associate a unique id with every test class object instantiated by TestNG #3079
Labels
Milestone
Comments
3 tasks
krmahadevan
added a commit
to krmahadevan/testng
that referenced
this issue
Mar 4, 2024
krmahadevan
added a commit
to krmahadevan/testng
that referenced
this issue
Mar 5, 2024
3 tasks
krmahadevan
added a commit
to krmahadevan/testng
that referenced
this issue
Mar 5, 2024
krmahadevan
added a commit
to krmahadevan/testng
that referenced
this issue
Mar 7, 2024
krmahadevan
added a commit
to krmahadevan/testng
that referenced
this issue
Mar 8, 2024
krmahadevan
added a commit
to krmahadevan/testng
that referenced
this issue
Mar 8, 2024
krmahadevan
added a commit
that referenced
this issue
Mar 14, 2024
* Add Unique Id for all test class instances Closes #3079
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently TestNG just instantiates an object and then it uses it internally.
Now normally this is fine, but when it comes to having to use a test class instance as a key to a map internally within TestNG we loose the ability to allow the JVM to successfully GC test class objects as and when they aren't used.
The solution for this would be that TestNG starts wrapping test class instances it produces within an object container wherein it has a unique id. So that whenever we would like to use that object as the key, we could merely use the id associated with the object as the key.
A real time usecase for this can be seen in this and this discussion.
The text was updated successfully, but these errors were encountered: