Re: [pgAdmin4][patch] Changes to stabilise feature tests

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][patch] Changes to stabilise feature tests
Date: 2018-10-17 10:52:35
Message-ID: CA+OCxoziZ2rkuRjN5ssnSPqZKMbaYZ+2fsYi9e6WakyiF9U7+g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi

On Tue, Oct 16, 2018 at 12:41 PM Aditya Toshniwal <
aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:

> Hi,
>
> On Tue, Oct 16, 2018 at 3:00 PM Aditya Toshniwal <
> aditya(dot)toshniwal(at)enterprisedb(dot)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 :(
>

Yeah, me too, though this patch is a definite improvement. Oddly, the
timeout I see now is this:

======================================================================

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

Seems odd that we'd time out waiting for something to not happen! This
actually happened after it entered just the first character of the backup
file name.

Anyway, it's all incremental, so patch applied!

Thanks.

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 Toshniwal
>> Software Engineer | EnterpriseDB Software Solutions | Pune
>> "Don't Complain about Heat, Plant a tree"
>>
>
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"
>

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2018-10-17 11:02:48 Re: fixes for browser.tests api test cases
Previous Message Dave Page 2018-10-17 10:50:27 pgAdmin 4 commit: Additional feature test fixes: