testng-team / testng

TestNG testing framework
https://testng.org
Apache License 2.0
1.98k stars 1.02k forks source link

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

Open PrakratiAgarwal123 opened 8 months ago

PrakratiAgarwal123 commented 8 months ago

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 commented 8 months ago

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

PrakratiAgarwal123 commented 8 months ago

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 commented 8 months ago

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

PrakratiAgarwal123 commented 8 months ago

https://github.com/testng-team/testng/issues/2854

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

krmahadevan commented 8 months ago

@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