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

Getting Ambiguous method overloading for method org.testng.Assert.assertEquals() in Groovy version 3.0.19 #3034

Open
PrakratiAgarwal123 opened this issue Jan 10, 2024 · 5 comments

Comments

@PrakratiAgarwal123
Copy link

PrakratiAgarwal123 commented Jan 10, 2024

Ambiguous method overloading for method org.testng.Assert#assertEquals. Cannot resolve which method to invoke for [class java.lang.Integer, class java.lang.Integer] due to overlapping prototypes between: [int, class java.lang.Integer] [class java.lang.Integer, int]

Code is -

List listOfClassFields = MyClass.classMethod("CO").read()
Assert.assertEquals(7,listOfClassFields.size())

Same code was working in groovy version 2.5.7

@krmahadevan
Copy link
Member

@PrakratiAgarwal123 - can you please share a sample project ( along with the dependencies) that can be used to reproduce this issue?

@PrakratiAgarwal123
Copy link
Author

PrakratiAgarwal123 commented Jan 10, 2024

Other versions are -

<groovy-all.version>3.0.19</groovy-all.version>
<gmavenplus-plugin.version>2.0.0</gmavenplus-plugin.version>
<maven-assembly-plugin.version>3.6.0</maven-assembly-plugin.version>
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
<maven-dependency-plugin.version>3.6.0</maven-dependency-plugin.version>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
<build-helper-maven-plugin.version>3.3.0</build-helper-maven-plugin.version>
<testng.version>7.9.0</testng.version>

@krmahadevan
Copy link
Member

@PrakratiAgarwal123 - Please create and share a sample project using which I can reproduce the problem easily.

@PrakratiAgarwal123
Copy link
Author

#2854

Its the similar issue like this link and I am using testng version 7.8.0

@krmahadevan
Copy link
Member

@PrakratiAgarwal123 - Your earlier comment said you are using 7.9.0 and now its 7.8.0. I believe it would be easier if you can please help share a simple project that can be used to reproduce the issue.

I would be curious to know as to what is the issue with sharing a simple maven/gradle project that we can use to reproduce the problem? I

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

No branches or pull requests

2 participants