Skip to content
This repository has been archived by the owner on Dec 20, 2022. It is now read-only.

Asynchronous Processing #99

Open
razvanmuscalu opened this issue May 31, 2022 · 1 comment
Open

Asynchronous Processing #99

razvanmuscalu opened this issue May 31, 2022 · 1 comment

Comments

@razvanmuscalu
Copy link

Hi,

First of all, this project is awesome; it makes API testing very easy to manage. We discovered it recently but are getting very fond of it.

I am not sure if what I ask needs to be supported by the IntelliJ HTTP client or can be supported by restcli.

We are running API tests in a suite that would mimic a user flow. In between some requests, our services are communicating to each other asynchronously via message queues. For example:

  • we hit an API on service A
  • service A publishes a message
  • service B consumes and processes the message
  • we hit an API on service B

We need to be able to introduce some delay between requests so that the message has time to arrive from service A to service B and service B to process the message. Otherwise, our assertions on service B will fail. Alternatively, being able to continuously call the API on service B until the assertion passes (or some timeout occurs) would also help.

Many thanks :)

@quangson91
Copy link
Collaborator

Hi @razvanmuscalu
Currently, there is no delay supported between the two requests.
You can fork this project and add some delay time here:
https://github.com/restcli/restcli/blob/master/src/main/java/uos/dev/restcli/HttpRequestFilesExecutor.kt#L144

Since I can only work on my side project on the weekend. So please try the above workaround first.

I will keep this issue to check & implement it in the future.

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants