Browse Source

Give the beeswax test test_save_results_to_tbl a little more time to complete.

Aaron T. Myers 15 years ago
parent
commit
c4c8a56ed6
2 changed files with 6 additions and 3 deletions
  1. 5 2
      apps/beeswax/src/beeswax/test_base.py
  2. 1 1
      apps/beeswax/src/beeswax/tests.py

+ 5 - 2
apps/beeswax/src/beeswax/test_base.py

@@ -116,6 +116,8 @@ def get_shared_beeswax_server():
         time.sleep(sleep)
         sleep *= 2
       except:
+        time.sleep(sleep)
+        sleep *= 2
         pass
     if not started:
       raise Exception("Beeswax server took too long to come up.")
@@ -147,8 +149,9 @@ def wait_for_query_to_finish(client, response, max=30.0):
     time.sleep(sleep_time)
     sleep_time = min(1.0, sleep_time * 2) # Capped exponential
     if (time.time() - start) > max:
-      LOG.warning("Query took too long!")
-      raise Exception("Query took too long.")
+      message = "Query took too long! %d seconds" % (time.time() - start,)
+      LOG.warning(message)
+      raise Exception(message)
 
     # Find out url to retry
     match = REFRESH_RE.search(response.content)

+ 1 - 1
apps/beeswax/src/beeswax/tests.py

@@ -568,7 +568,7 @@ for x in sys.stdin:
         'save': True
       }
       resp = self.client.post('/beeswax/save_results/%s' % (qid,), save_data, follow=True)
-      wait_for_query_to_finish(self.client, resp, max=60)
+      wait_for_query_to_finish(self.client, resp, max=120)
 
       # Check that data is right. The SELECT may not give us the whole table.
       resp = _make_query(self.client, 'SELECT * FROM %s' % (target_tbl,), wait=True)