Thread: [pgAdmin4][patch] Changes to stabilise feature tests
Attachment
Hi Hackers,Attached is the patch to stabilise feature tests. Major changes includes:1) Changes required for working with Bootstrap 4.2) Change to fix the timeout exception when waiting for element (tested multiple times on multiple server, did not occur to me thereafter)
3) Removed reset layout after each test case. Instead, delete the layout entry from sqlite db file and do a plain refresh. This will save some time and will also remove dependency on reset layout menu.4) Disables tree state saving when feature test run starts. Feature tests got confused with auto expanding tree.--Thanks and Regards,Aditya ToshniwalSoftware Engineer | EnterpriseDB Software Solutions | Pune"Don't Complain about Heat, Plant a tree"
Hi,On Tue, Oct 16, 2018 at 3:00 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Hackers,Attached is the patch to stabilise feature tests. Major changes includes:1) Changes required for working with Bootstrap 4.2) Change to fix the timeout exception when waiting for element (tested multiple times on multiple server, did not occur to me thereafter)Still facing this sometimes :(
======================================================================
ERROR: runTest (pgadmin.feature_tests.pg_utilities_backup_restore_test.PGUtilitiesBackupFeatureTest)
Test for PG utilities - Backup and Restore
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py", line 68, in tearDown
self.after()
File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_utilities_backup_restore_test.py", line 138, in after
self.page.remove_server(self.server)
File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 147, in remove_server
self.click_element(delete_menu_item)
File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 224, in click_element
"clicking the element not to throw an exception", click_succeeded
File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 367, in _wait_for
"Timed out waiting for " + waiting_for_message
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/selenium/webdriver/support/wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: Timed out waiting for clicking the element not to throw an exception
3) Removed reset layout after each test case. Instead, delete the layout entry from sqlite db file and do a plain refresh. This will save some time and will also remove dependency on reset layout menu.4) Disables tree state saving when feature test run starts. Feature tests got confused with auto expanding tree.--Thanks and Regards,Aditya ToshniwalSoftware Engineer | EnterpriseDB Software Solutions | Pune"Don't Complain about Heat, Plant a tree"--Thanks and Regards,Aditya ToshniwalSoftware Engineer | EnterpriseDB Software Solutions | Pune"Don't Complain about Heat, Plant a tree"
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company