In the new 2.6 version I can't clear expectations.
I'm setting up an expectation for some WSDLs and Mock responses, but when a test fails I want to clear the expectations. When sending a put request to the /clear resources the expectations are not cleared.
First I setting up this GET expectation:
PUT http://localhost:8401/expectation HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json
Content-Length: 6982
Host: localhost:8401
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
{
"httpRequest": {
"method": "GET",
"path": "/elementair/PersoonService/1.1",
"queryString": "(?i)wsdl"
},
"httpResponse": {
"statusCode": 200,
"headers": [
{
"name": "Content-Type",
"values": ["text/xml; charset=utf-8"]
}
],
"body": " "
},
"times": {
"unlimited": true
}
}
To clear the expectation I use:
PUT http://localhost:8401/clear HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json;charset=UTF-8
Content-Length: 76
Host: localhost:8401
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
{
"httpRequest": {
"method": "GET"
}
}
The clear operation returns with a 202 Accepted.
Thanks in advance,
Robert