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

callSingle update #1884

Merged
merged 2 commits into from
Jan 5, 2022
Merged

callSingle update #1884

merged 2 commits into from
Jan 5, 2022

Conversation

OreOreDa
Copy link

@OreOreDa OreOreDa commented Jan 5, 2022

Description

When performing "karate.configure('callSingleCache', { minutes: 15 })", some users would expect the feature to be executed again every 15min when doing "karate.callSingle(feature, args)"

  • Relevant Issues : The feature executed once by "callSingle" is not executed again when using "callSingleCache"
  • Relevant PRs
    • Type of change :
    • New feature
    • Bug fix for existing feature
    • Code quality improvement
    • Addition or Improvement of tests
    • Addition or Improvement of documentation

@OreOreDa OreOreDa closed this Jan 5, 2022
@OreOreDa OreOreDa reopened this Jan 5, 2022
@ptrthomas
Copy link
Member

@OreOreDa sorry I don't understand the logic so I request someone with more time to review. I consider doing the cache check outside the synchronized block important as an optimization and I don't like changing that

@OreOreDa
Copy link
Author

OreOreDa commented Jan 5, 2022

@ptrthomas The thing is, if there is a cache hit right away, you don't get a chance to test the cache file and renew it - and the cache file check has to be done in the synchronized block
Maybe we could do the check outside the synchronized block only if "minutes" is zero (i.e. no "callSingleCache" is used) ?

@OreOreDa
Copy link
Author

OreOreDa commented Jan 5, 2022

@ptrthomas I updated my PR, thanks!

@ptrthomas ptrthomas merged commit a7885a0 into karatelabs:master Jan 5, 2022
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

Successfully merging this pull request may close these issues.

2 participants