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
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.
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
ModelConstructionTest.createConstructibleInstance
which usesAssert.assertNotSame
https://github.com/eclipse/microprofile-open-api/blob/d768dbe6e267d4b37e09c6c676474cd9d7786208/tck/src/main/java/org/eclipse/microprofile/openapi/tck/ModelConstructionTest.java#L1379The 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.