You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.AssertionError: Expected unsafe args to be {extra=[extra], missing=[missing_secret, missing_secret2]}, but found {extra=[extra], missing=[missing_secret, missing_secret_2]}
which is confusing because it looks like expected and actual are the same. Actually, their types are different -- one is a String "[extra]" and one is a Set ImmutableSet.of("extra").
In the case where two objects are different, but their toStrings() are equal, we should additionally show in the error message the types of the two objects.
What happened?
I recently got this error message:
java.lang.AssertionError: Expected unsafe args to be {extra=[extra], missing=[missing_secret, missing_secret2]}, but found {extra=[extra], missing=[missing_secret, missing_secret_2]}
which is confusing because it looks like expected and actual are the same. Actually, their types are different -- one is a String
"[extra]"
and one is a SetImmutableSet.of("extra")
.In the case where two objects are different, but their toStrings() are equal, we should additionally show in the error message the types of the two objects.
This would happen here:
conjure-java-runtime-api/test-utils/src/main/java/com/palantir/conjure/java/api/testing/ServiceExceptionAssert.java
Line 68 in 41e7566
Minimal repo:
currently gives message:
java.lang.AssertionError: Expected unsafe args to be {list=[a]}, but found {list=[a]}
What did you want to happen?
Should return a message like:
java.lang.AssertionError: Expected unsafe args to be {list=[a]} with value type String, but found {list=[a]} with value type ImmutableList<String>
The text was updated successfully, but these errors were encountered: