eclipse / microprofile-open-api

Microprofile open api
Apache License 2.0
131 stars 82 forks source link

TestNG 7.4.0 Assert.assertNotSame has a bug which causes ModelConstructionTest TCK to fail #494

Closed tevans78 closed 2 years ago

tevans78 commented 2 years ago

assertNotSame ought to assert that two objects are not the same (==) but in version 7.4.0 of TestNG it tests if they are equal. This can cause a TCK failure where two object are expected to be different instances even though they are equal. The tests that fail for me are

The bug was reported multiple times in TestNG and has been fixed but is not yet in a released version. https://github.com/cbeust/testng/issues/2486 https://github.com/cbeust/testng/issues/2616

Although this issue has been found in the MP OpenAPI TCK, it may be a problem across the whole of MicroProfile 5.0, where the TestNG version is 7.4.0. I suggest that for now the MicroProfile TCKs should avoid use of Assert.assertNotSame.