-
Notifications
You must be signed in to change notification settings - Fork 81
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
Make each test independent #109
Comments
I have looked into creating and deleting the index with each test and the problem I have run into is because the tests are running in threads, the tests still fail. The reason for this is multiple tests can be running at the same time trying to use the same index name. One solution to this is to run the tests all in a single thread with Some solutions I can currently think of are:
|
@sanders41 I have already thought about this issue. Your third solution has already been applied here and I plan to extend this structure to all other tests. However, there is another issue that you did not expect. For a reason I am unable to explain when tests make simultaneous requests to the MeiliSearch server, requests will hang and never get answers. So we cannot remove |
I have seen this issue also. I was guessing it was happening because of the index overlap, but sounds like your testing shows that isn’t the cause. |
225: Bump meilisearch to v0.25.0 - New task API r=curquiza a=irevoire We’ll do a little overview of what changed in this PR. For the users: - All the update types have been renamed to task - The creation and deletion of index are now asynchronous - The `Progress` type have been removed entirely. - The method `wait_for_pending_update` has been replaced by the method `wait_for_task` which takes a task uid or a task directly in parameter. - A method `wait_for_completion` has been implemented directly on the Task For the contributors: - fix #217 - #126 has been started with the new `MeiliSearch_test` macro for the unit tests only: https://github.com/meilisearch/meilisearch-rust/blob/41dd6dc765b7938ac399a12db2576b6ab9d479d1/meilisearch-test-macro/README.md - fix #109 Co-authored-by: Tamo <tamo@meilisearch.com>
Closed by #225 |
To avoid side effects between each test, the tests should all be independent.
It means, at the beginning of each test:
And at the end of each test:
This is linked to #29
The text was updated successfully, but these errors were encountered: