JFrog is announcing Bintray sunset and that is where TestNG eclipse plugins are served. Any plans on the move?
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/c7bfaca2-c88e-47eb-8961-12ca91583196n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/CAOphgJBXhm90Z3_YuGeEMiu3NymdG9a%2Bds3w%3DAwFsVWd_chUwA%40mail.gmail.com.
What’s actually included in this release?
Switching from 7.3.0 to 7.4.0 and I’m getting weird test failures comparing dynamic proxies.
Anyone noticed any odd behaviour with 7.4.0 ( or more its assertions)?
The test in question uses org.testng.Assert.assertNotSame - which doesn’t appear to have changed between 7.3.0 and 7.4.0 - and both use Objects.equals() - which confuses me the most.
[ERROR] TranslationTest.entityLeaf:111 expected not same [TranslationTest$BB@4873d4cb] but found [TranslationTest$BB@4873d4cb]
is what I get - not I’m going crazy wonder if I have an 11 year old latent bug manifesting, or some weird behaviour change in TestNG.
Time to try git diffs and bisects.
Also - according to the debugger - these are different objects being compared.
Altho they are deep clones - so it is plausible that Objects.equals() should be returning they’re equal - and just never have before.
Turns out its a bug fix in TestNG:
~/t/testng on master ❯ git show 841ae94bd07f68695878f679e03f6d6be6a1884d
commit 841ae94bd07f68695878f679e03f6d6be6a1884d
Author: prashant-maroti <77716971+pra...@users.noreply.github.com>
Date: Tue Jan 26 15:45:30 2021 +0530
….
public static void assertSame(Object actual, Object expected, String message) {
- if (expected == actual) {
+ if (Objects.equals(actual, expected)) {
return;
}
failNotSame(actual, expected, message);
@@ -1001,7 +1001,7 @@ public class Assert {
* @param message the assertion error message
*/
public static void assertNotSame(Object actual, Object expected, String message) {
- if (expected == actual) {
+ if (Objects.equals(actual, expected)) {
failSame(actual, expected, message);
}
}
It seems this old old old test should have been using assertNotEquals instead of assertNotSame.
Cheers for the new release - and identifying bad tests on our side gf things :) Mark