Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.15.0] Expectation is listed in 'active expectation' list after 'timeToLive' is expired #1874

Open
mihalichzh opened this issue May 21, 2024 · 0 comments

Comments

@mihalichzh
Copy link

mihalichzh commented May 21, 2024

MockServer version: 5.15.0

Describe the bug
Expectation is listed in 'active expectation list' after 'timeToLive' is expired.

To Reproduce
Steps to reproduce the behavior:

  1. Set expectation with 'timeToLive' property defined, e.g.:
curl -X PUT 'localhost:1080/mockserver/expectation' \
-d '{
  "httpRequest": {
    "method": "GET",
    "path": "/2345",
  },
  "httpResponse": {
    "body": "This is an example of mocked response"
  },
  "timeToLive" : {
    "timeUnit" : "SECONDS",
    "timeToLive" : 30,
    "unlimited" : false
  }
}'
  1. Wait for a 'timeToLive' to expire;
  2. Check active expectations list.

Expected behavior
Expectation is removed after 'timeToLive' is expired.

Actual behavior
Expectation is not removed from active expectations list after 'timeToLive' is expired. Expectation is removed only after user performed request to MockServer (both matching/non-matching).

@mihalichzh mihalichzh changed the title [5.15.0] Expectation is listed in 'active expectation' list after 'timeToLive' is expired. [5.15.0] Expectation is listed in 'active expectation' list after 'timeToLive' is expired May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant