davisp commented on a change in pull request #2585: Mango Indexes on 
FoundationDB
URL: https://github.com/apache/couchdb/pull/2585#discussion_r397985912
 
 

 ##########
 File path: src/mango/test/mango.py
 ##########
 @@ -156,13 +157,29 @@ def create_index(
         assert r.json()["name"] is not None
 
         created = r.json()["result"] == "created"
-        if created:
-            # wait until the database reports the index as available
-            while len(self.get_index(r.json()["id"], r.json()["name"])) < 1:
-                delay(t=0.1)
+        if created and wait_for_built_index:
+            # wait until the database reports the index as available and build
+            while (
 
 Review comment:
   How about:
   
   ```python
   while True:
       idx = self.get_index(r.json()["id"], r.json()["name"])[0]
       if idx["build_status"] == "ready":
           break
       delay(t = 0.2)
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to