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

Add option to disable recording of identical requests #391

Open
Khartir opened this issue Jul 17, 2023 · 0 comments
Open

Add option to disable recording of identical requests #391

Khartir opened this issue Jul 17, 2023 · 0 comments
Labels
Enhancement Optimize code or features Status: Needs decision

Comments

@Khartir
Copy link
Contributor

Khartir commented Jul 17, 2023

It would be really nice to have the option to disable the recording of identical requests (#161). While this feature is definitely useful for some people it unfortunately breaks my use case.

I have some tests that make two (different) requests to the same API. That API requires authorization, which requires another request to get a token. When recording the requests the following happens:

  1. Get the auth token and cache it
  2. Do the first request
  3. Get the cached auth token
  4. Do the second request

This works fine. The issue occurs when we run this test at a later time. The auth token has an expire time, which is of course part of the recorded response. So when we run the test the following happens:

  1. Get the auth token and cache it
  2. Do the first request
  3. Try to get the cached auth token, notice it is no longer vaild
  4. Try to get the auth token and fail because the request index does not match

I currently work around this by removing the index from the saved request, which works but is not ideal.

In my use case I don't need the option to record multiple identical requests so a simple option to disable the index-check would work.

@higidi higidi added Feature New feature or request Enhancement Optimize code or features Status: Needs decision and removed Feature New feature or request labels Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Optimize code or features Status: Needs decision
Projects
None yet
Development

No branches or pull requests

2 participants