public inbox for [email protected]
help / color / mirror / Atom feedFrom: George Gelashvili <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: feature test timeouts
Date: Fri, 26 May 2017 18:26:38 -0400
Message-ID: <CAHowoHbxP5Y6cN+0tYMe9M13m0vaupqOwoUdKnoUuZm5qzSH2Q@mail.gmail.com> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
Hello Hackers,
We are running tests including feature tests in Circle CI, and have been
seeing some flakiness due to what we believe are insufficient wait-for
timeouts.
This shouldn't increase the overall test time, but only allow waiting
longer for an element to appear, if needed.
We've also split out the app start timeout since that seemed to need more
time on CI.
Patch attached.
Thanks!
Joao, Matt, and George
diff --git a/web/regression/feature_utils/pgadmin_page.py b/web/regression/feature_utils/pgadmin_page.py
index b1dfa182..b9abe7ca 100644
--- a/web/regression/feature_utils/pgadmin_page.py
+++ b/web/regression/feature_utils/pgadmin_page.py
@@ -26,7 +26,8 @@ class PgadminPage:
def __init__(self, driver, app_config):
self.driver = driver
self.app_config = app_config
- self.timeout = 10
+ self.timeout = 30
+ self.app_start_timeout = 60
def reset_layout(self):
self.click_element(self.find_by_partial_link_text("File"))
@@ -178,8 +179,10 @@ class PgadminPage:
driver.refresh()
return False
- self._wait_for("app to start", page_shows_app)
+ self._wait_for("app to start", page_shows_app, self.app_start_timeout)
- def _wait_for(self, waiting_for_message, condition_met_function):
- return WebDriverWait(self.driver, self.timeout, 0.01).until(condition_met_function,
+ def _wait_for(self, waiting_for_message, condition_met_function, timeout = None):
+ if timeout is None:
+ timeout = self.timeout
+ return WebDriverWait(self.driver, timeout, 0.01).until(condition_met_function,
"Timed out waiting for " + waiting_for_message)
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[text/plain] change-some-feature-test-timeouts.diff (1.3K, 3-change-some-feature-test-timeouts.diff)
download | inline diff:
diff --git a/web/regression/feature_utils/pgadmin_page.py b/web/regression/feature_utils/pgadmin_page.py
index b1dfa182..b9abe7ca 100644
--- a/web/regression/feature_utils/pgadmin_page.py
+++ b/web/regression/feature_utils/pgadmin_page.py
@@ -26,7 +26,8 @@ class PgadminPage:
def __init__(self, driver, app_config):
self.driver = driver
self.app_config = app_config
- self.timeout = 10
+ self.timeout = 30
+ self.app_start_timeout = 60
def reset_layout(self):
self.click_element(self.find_by_partial_link_text("File"))
@@ -178,8 +179,10 @@ class PgadminPage:
driver.refresh()
return False
- self._wait_for("app to start", page_shows_app)
+ self._wait_for("app to start", page_shows_app, self.app_start_timeout)
- def _wait_for(self, waiting_for_message, condition_met_function):
- return WebDriverWait(self.driver, self.timeout, 0.01).until(condition_met_function,
+ def _wait_for(self, waiting_for_message, condition_met_function, timeout = None):
+ if timeout is None:
+ timeout = self.timeout
+ return WebDriverWait(self.driver, timeout, 0.01).until(condition_met_function,
"Timed out waiting for " + waiting_for_message)
view thread (9+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: feature test timeouts
In-Reply-To: <CAHowoHbxP5Y6cN+0tYMe9M13m0vaupqOwoUdKnoUuZm5qzSH2Q@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox