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

Wait till some conditions are matched #3513

Open
1 task
allevo opened this issue Dec 10, 2024 · 3 comments
Open
1 task

Wait till some conditions are matched #3513

allevo opened this issue Dec 10, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@allevo
Copy link

allevo commented Dec 10, 2024

Problem to solve

I have two endpoints:

  • the first one processes the input data in background. The time used to process that data is unknown, but typically in a few seconds
  • the second endpoint fetches the processed data.

I have the Hurl script that invokes the first and second endpoints.
The first invocation was correctly processed, and the response was okay.
The second invocation failed because the data was not yet available.

I didn't find any mention in the docs of how to resolve this issue.

Proposal

  • The fast implementation could be put a "sleep 5" command to stop the execution for 5 seconds
  • Another implementation could be a "while" loop that executes the invocation till some conditions are matched (HTTP status code, body checks)

Additional context and resources

Tasks to complete

  • ???
@allevo allevo added the enhancement New feature or request label Dec 10, 2024
@lepapareil
Copy link
Collaborator

lepapareil commented Dec 10, 2024

Hi @allevo !

You can use :

@allevo
Copy link
Author

allevo commented Dec 10, 2024

Hi! Thank you for the quick answer.
Can I suggest making that configuration searchable with "sleep" "wait" keywords?

@jcamiel jcamiel added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Dec 10, 2024
@lepapareil
Copy link
Collaborator

Hi @allevo !

Thanks to @jcamiel, searching sleep now leads to delay pages => https://hurl.dev/search.html?query=sleep# 😊.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants