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
This test fails (with an unhelpful Internal Server Error, but that's another issue), but the ordered variant passes.
I debugged this down to matchEqualsIgnoreOrder and then the matchEquality fallback. This ends up comparing two byte arrays (which contain the json content) with equals instead of Arrays.equals(), resulting in a false result even though the arrays are equal by content. See the attached zip for a fully functional gradle project to reproduce the effect.
Hello. I've got the same issue. After upgrading from au.com.dius.pact.provider:junit5 from 4.3.15 to 4.3.16, some tests started failing.
After some debugging I was able to narrow down the case to MatcherExecutor.matchEqualsIgnoreOrder which apparently receives byte[] arrays as expected and actual, but defines no matchers for that type and falls back to matchEquality, as @jakobmagiera described above.
I have a reproducible case where the pact specifies a request body as follows:
The consumer test looks like this:
This test fails (with an unhelpful Internal Server Error, but that's another issue), but the ordered variant passes.
I debugged this down to matchEqualsIgnoreOrder and then the matchEquality fallback. This ends up comparing two byte arrays (which contain the json content) with equals instead of Arrays.equals(), resulting in a false result even though the arrays are equal by content. See the attached zip for a fully functional gradle project to reproduce the effect.
PactTestArrayFailure.zip
The text was updated successfully, but these errors were encountered: