From f99e8a866a5d1601c723a22af36a552914e51f8d Mon Sep 17 00:00:00 2001 From: Tony Tung Date: Wed, 25 Apr 2018 16:54:35 -0700 Subject: [PATCH] Cap the number of results for test_search Otherwise, we time out on travis runs. --- test/test_dss_api.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_dss_api.py b/test/test_dss_api.py index 8fc7a271..e28dff5a 100755 --- a/test/test_dss_api.py +++ b/test/test_dss_api.py @@ -114,13 +114,15 @@ def test_python_subscriptions(self): with self.assertRaisesRegexp(Exception, "Cannot find subscription!"): resp = client.get_subscription(replica="aws", uuid=subscription_uuid) - def test_search(self): + def test_search(self, limit=128): client = hca.dss.DSSClient() query = {} - for result in client.post_search.iterate(es_query=query, replica="aws"): + for ix, result in enumerate(client.post_search.iterate(es_query=query, replica="aws")): self.assertIn("bundle_fqid", result) + if ix > limit: + break @reset_tweak_changes def test_python_login_logout(self):