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

Update to TestNG 7.10.0 fails #116

Closed
sormuras opened this issue Apr 8, 2024 · 13 comments
Closed

Update to TestNG 7.10.0 fails #116

sormuras opened this issue Apr 8, 2024 · 13 comments
Assignees

Comments

@sormuras
Copy link
Member

sormuras commented Apr 8, 2024

As noted in

That method is used by the testng-engine implementation here:

@krmahadevan
Copy link
Collaborator

@sormuras - This is now fixed as part of fixing testng-team/testng#3110

Once i get a confirmation from the user who logged the above mentioned issue, I will wrap up the release.

@marcphilipp
Copy link
Member

@krmahadevan Thanks for the quick turnaround! 👍

@marcphilipp
Copy link
Member

@krmahadevan Is there a replacement for the deprecated API that should be used instead?

@krmahadevan
Copy link
Collaborator

TestNG 7.10.1 is now available on Maven central https://repo1.maven.org/maven2/org/testng/testng/7.10.1/

@marcphilipp marcphilipp self-assigned this Apr 9, 2024
@krmahadevan
Copy link
Collaborator

@krmahadevan Is there a replacement for the deprecated API that should be used instead?

No. That api was not serving any purpose from an end user perspective, because all it was doing was giving out hashCodes of the test class objects that were produced by each of the factory call invocations. That was why we moved all of them out from the public facing to internal, because they are still needed internal. I need to still sift through the codebase to see if they are still needed internally or not. It's like peeling onions :)

@marcphilipp
Copy link
Member

Ok, so do you think it's fine if we keep using it here?

@krmahadevan
Copy link
Collaborator

It will be removed in the upcoming versions @marcphilipp

The TestNG codebase uses the same api but from an internal package. So it's needed internally, but it wont be available for TestNG consumers.

@marcphilipp
Copy link
Member

We use it to compute the test class instance index which is appended to the display name:

private static Integer getFactoryMethodInvocationIndex(ITestResult result) {
long[] instanceHashCodes = result.getTestClass().getInstanceHashCodes();
if (instanceHashCodes.length > 1) {
long hashCode = result.getInstance().hashCode();
for (int i = 0; i < instanceHashCodes.length; ++i) {
if (instanceHashCodes[i] == hashCode) {
return i;
}
}
}
return null;
}

This is important to be able to differentiate between the different parameterized executions. Is there an undeprecated API that we can use to achieve the same?

@marcphilipp
Copy link
Member

TestNG 7.10.1 is now available on Maven central repo1.maven.org/maven2/org/testng/testng/7.10.1

Could you please also publishing a new 7.11.0-SNAPSHOT to oss.sonatype.org?

@krmahadevan
Copy link
Collaborator

We use it to compute the test class instance index which is appended to the display name:

private static Integer getFactoryMethodInvocationIndex(ITestResult result) {
long[] instanceHashCodes = result.getTestClass().getInstanceHashCodes();
if (instanceHashCodes.length > 1) {
long hashCode = result.getInstance().hashCode();
for (int i = 0; i < instanceHashCodes.length; ++i) {
if (instanceHashCodes[i] == hashCode) {
return i;
}
}
}
return null;
}

This is important to be able to differentiate between the different parameterized executions. Is there an undeprecated API that we can use to achieve the same?

Ok. I will have to find out. Can this wait? If possible please log a bug so that I don't forget. Right now in the middle of an assignment that I need to wrap up within this week as part of an interview process.

Would want to first get that out of the way

@krmahadevan
Copy link
Collaborator

TestNG 7.10.1 is now available on Maven central repo1.maven.org/maven2/org/testng/testng/7.10.1

Could you please also publishing a new 7.11.0-SNAPSHOT to oss.sonatype.org?

Sure. I will do that in sometime.

@marcphilipp
Copy link
Member

Ok. I will have to find out. Can this wait? If possible please log a bug so that I don't forget. Right now in the middle of an assignment that I need to wrap up within this week as part of an interview process.

Would want to first get that out of the way

Sure, no worries! I created testng-team/testng#3111

Could you please also publishing a new 7.11.0-SNAPSHOT to oss.sonatype.org?

Sure. I will do that in sometime.

I'll leave this issue open until that is done because I've configured the build to ignore the failing tests against the snapshot version for now which I'd like to revert:

ignoreFailures = version.isSnapshot() // TODO remove this line once a new 7.11.0-SNAPSHOT artifact is available

@krmahadevan
Copy link
Collaborator

@marcphilipp - The next snapshot has been published https://oss.sonatype.org/content/repositories/snapshots/org/testng/testng/7.11.0-SNAPSHOT/

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

No branches or pull requests

3 participants