Re: [pgAdmin4][Patch] Feature #3204 Notify/Listen not working in version 2.1

From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: Joao Pedro De Almeida Pereira <jdealmeidapereira(at)pivotal(dot)io>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][Patch] Feature #3204 Notify/Listen not working in version 2.1
Date: 2018-05-16 09:40:55
Message-ID: CANxoLDfU8sQTZh8-HgvvdWd1kxEaqw0k=o6sFyo=xAKVPq7m6g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Hackers,

On Tue, May 15, 2018 at 9:52 PM, Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com
> wrote:

> Hi Joao
>
> On Tue, 15 May 2018, 19:36 Joao De Almeida Pereira, <
> jdealmeidapereira(at)pivotal(dot)io> wrote:
>
>> Hi Akshay,
>>
>> This patch is flaky; it doesn't always pass the tests in our pipeline.
>>
>> ======================================================================
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:116>
>> ERROR: runTest (pgadmin.feature_tests.query_tool_tests.QueryToolFeatureTest)
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:117>
>> Query tool feature test
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:118>
>> ----------------------------------------------------------------------
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:119>
>> Traceback (most recent call last):
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:120>
>> File "/tmp/build/5988fb0a/pgadmin-repo/web/pgadmin/feature_tests/query_tool_tests.py", line 101, in runTest
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:121>
>> self._query_tool_notify_statements()
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:122>
>> File "/tmp/build/5988fb0a/pgadmin-repo/web/pgadmin/feature_tests/query_tool_tests.py", line 643, in _query_tool_notify_statements
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:123>
>> '//div[contains(@class, "sql-editor-message") and '
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:124>
>> File "/tmp/build/5988fb0a/pgadmin-repo/web/regression/feature_utils/pgadmin_page.py", line 169, in find_by_xpath
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:125>
>> lambda driver: driver.find_element_by_xpath(xpath)
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:126>
>> File "/tmp/build/5988fb0a/pgadmin-repo/web/regression/feature_utils/pgadmin_page.py", line 261, in wait_for_element
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:127>
>> return self._wait_for("element to exist", element_if_it_exists)
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:128>
>> File "/tmp/build/5988fb0a/pgadmin-repo/web/regression/feature_utils/pgadmin_page.py", line 327, in _wait_for
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:129>
>> "Timed out waiting for " + waiting_for_message
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:130>
>> File "/root/.pyenv/versions/pgadmin/lib/python2.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:131>
>> raise TimeoutException(message, screen, stacktrace)
>> <https://gpdb-dev.bosh.pivotalci.info/teams/pgadmin/pipelines/pgadmin-patch/jobs/run-tests/builds/77#L5ae79092:132>
>> TimeoutException: Message: Timed out waiting for element to exist
>>
>>
>> All the failures are related to query_tool_notify_statements. Please
>> take another look.
>>
>
> There is some serious problems of timeout issues. I have tested it
> couple of times and working fine. Will test tomorrow one more time. I have
> followed the code written in the same file. If those test cases have passed
> then this should also.
>

Issue is with Python 2.7, yesterday i have verified it on Python 3.5.
Attached is the modified patch, please review it.

>
>> Sincerely,
>>
>> Victoria & Joao
>>
>> On Tue, May 15, 2018 at 6:01 AM Akshay Joshi <
>> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>>
>>> Hi Hackers,
>>>
>>> Attached is the patch to capture the notification from psycopg2 and
>>> displayed it in "Messages" tab of query tool. Added feature test to cover
>>> this scenario.
>>>
>>> Refer Notification.png file to how it looks in "Messages" tab. Please
>>> review it.
>>>
>>> --
>>> *Akshay Joshi*
>>>
>>> *Sr. Software Architect *
>>>
>>>
>>>
>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>>
>>

--
*Akshay Joshi*

*Sr. Software Architect *

*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*

Attachment Content-Type Size
RM_3204_v2.patch application/octet-stream 4.8 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Neel Patel 2018-05-16 10:41:09 Re: [PGAGENT] [PATCH] Remove wxWidget dependency
Previous Message Ashesh Vashi 2018-05-16 07:20:10 Re: [pgadmin4][patch] Initial patch to decouple from ACI Tree