Added logging for feature test failure on jenkins job.

This commit is contained in:
Yogesh Mahajan 2023-02-10 12:39:42 +05:30 committed by GitHub
parent b0846908da
commit ff877d6e91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 0 deletions

View File

@ -31,10 +31,12 @@ class BrowserToolBarFeatureTest(BaseFeatureTest):
def before(self):
self.page.wait_for_spinner_to_disappear()
self.page.add_server(self.server)
print("Added server", file=sys.stderr)
self.test_table_name = "test_table" + str(
secrets.choice(range(1000, 3000)))
test_utils.create_table(self.server, self.test_db,
self.test_table_name)
print("before completed", file=sys.stderr)
def runTest(self):
# Check for query tool button

View File

@ -38,6 +38,7 @@ class BaseFeatureTest(BaseTestGenerator):
try:
if self.parallel_ui_tests:
self.page.login_to_app(self.server['login_details'])
print("Login successful", file=sys.stderr)
test_utils.reset_layout_db()
self.page.driver.switch_to.default_content()
self.page.wait_for_app()

View File

@ -1371,6 +1371,7 @@ def launch_url_in_browser(driver_instance, url, title='pgAdmin 4', timeout=50):
driver_instance.get(url)
wait = WebDriverWait(driver_instance, 10)
wait.until(ec.title_is(title))
print("pgAdmin launched in browser", file=sys.stderr)
break
except WebDriverException as e:
time.sleep(6)

View File

@ -599,9 +599,11 @@ def run_parallel_tests(url_client, servers_details, parallel_tests_lists,
threads_list = []
# Create thread for each server
for ser in servers_details:
print("Running for ser", ser['name'], file=sys.stderr)
while True:
# If active thread count <= max_thread_count, add new thread
if threading.active_count() <= max_thread_count:
print("Created a thread", file=sys.stderr)
# Get remote web-driver instance at server level
driver_object = \
test_utils.get_remote_webdriver(hub_url,
@ -863,12 +865,17 @@ if __name__ == '__main__':
file=sys.stderr)
time.sleep(int(pgAdmin_wait_time))
print('pgAdmin sleep for debug over',
file=sys.stderr)
# Running Parallel tests
if len(parallel_tests) > 0:
parallel_sessions = \
int(selenoid_config[
'max_parallel_sessions'])
print("Running parallel test", file=sys.stderr)
print("parallel_sessions = ",
parallel_sessions, file=sys.stderr)
run_parallel_tests(
client_url, servers_info, parallel_tests,