vendredi 25 janvier 2019

Integration test two http requests that depend upon each other in C/C++

I have an async (epoll based) http server written in C++ using that serves as a message broker. This is the scenario that I am manually testing with curl

Request 1: Long poll asking for a message. There are none, so this request waits until a message arrives.

Request 2: Puts in a message that resolves request 1.

I'm unsure of the best way to orchestrate this. Any recommendations would be massively appreciated.

My current thought is to use threads for the requests and have the responses write to files, and then a sleep/wake/check file for data loop with some timeout...but I'm hoping that better tooling/approaches exists :)

Aucun commentaire:

Enregistrer un commentaire