Async Data Fetch and Testing


I am trying to test some code that gets data from Elastic Search. I am using Python. The problem is that my code seems to run asynchronously, so when I try to assert the data fetched the test fails because I has not retrieved the data yet.

Currently, we are setting up a waiting time before the assertion to solve this.

I would like to know if anybody solved this in a more precise way.


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.