diff --git a/tests/AlgoliaSearch/Tests/SearchFacetTest.php b/tests/AlgoliaSearch/Tests/SearchFacetTest.php
index <HASH>..<HASH> 100644
--- a/tests/AlgoliaSearch/Tests/SearchFacetTest.php
+++ b/tests/AlgoliaSearch/Tests/SearchFacetTest.php
@@ -75,8 +75,9 @@ class SearchFacetTest extends AlgoliaSearchTestCase
             )
         );
 
-        $this->index->setSettings($settings);
+        $settingsTask = $this->index->setSettings($settings);
         $task = $this->index->addObjects($objects);
+        $this->index->waitTask($settingsTask['taskID']);
         $this->index->waitTask($task['taskID']);
 
         # Straightforward search.
test(facets): Add waitTask for setSettings