In wiremock java library when I set ignoreRepeatRequests in recordingSpec to avoid the scenarios, stub mappings are not created for some recorded requests.
I suspect AbstractLogicalMatcher equality check is only looking at first operand and ignoring everything else when checking equality. Parent class' equals implementation is used and it is incorrectly doing equals check when identifying duplicate requests
{
"id" : "04e8d8e1-c8cc-477f-96e4-c4d6d024eac3",
"name" : "service_session_getSession",
"request" : {
"url" : "/service/test",
"method" : "POST",
"bodyPatterns" : [ {
"and" : [ {
"matchesJsonPath" : {
"expression" : "$.sessionContext",
"equalToJson" : "",
"ignoreArrayOrder" : true,
"ignoreExtraElements" : true
}
}, {
"matchesJsonPath" : {
"expression" : "$.method",
"equalTo" : "getSession"
}
}, {
"matchesJsonPath" : {
"expression" : "$.sessionId",
"equalTo" : "e980bf4f-bad7-3fae-b845-d4fd8dbf9a3a"
}
} ]
} ]
},
"response" : {
"status" : 200,
"bodyFileName" : "service_session-04e8d8e1-c8cc-477f-96e4-c4d6d024eac3.json"
},
"uuid" : "04e8d8e1-c8cc-477f-96e4-c4d6d024eac3",
"persistent" : true,
"priority" : 1,
"insertionIndex" : 1
}
Proposal
Issue
In wiremock java library when I set ignoreRepeatRequests in recordingSpec to avoid the scenarios, stub mappings are not created for some recorded requests.
I suspect AbstractLogicalMatcher equality check is only looking at first operand and ignoring everything else when checking equality. Parent class' equals implementation is used and it is incorrectly doing equals check when identifying duplicate requests
References
No response
Reproduction steps
References
No response