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

2018-05-15 Thread Akshay Joshi
Hi Joao

On Tue, 15 May 2018, 19:36 Joao De Almeida Pereira, <
jdealmeidapere...@pivotal.io> wrote:

> Hi Akshay,
>
> This patch is flaky; it doesn't always pass the tests in our pipeline.
>
> ==
>  
> 
> ERROR: runTest (pgadmin.feature_tests.query_tool_tests.QueryToolFeatureTest)
>  
> 
> Query tool feature test
>  
> 
> --
>  
> 
> Traceback (most recent call last):
>  
> 
>   File 
> "/tmp/build/5988fb0a/pgadmin-repo/web/pgadmin/feature_tests/query_tool_tests.py",
>  line 101, in runTest
>  
> 
> self._query_tool_notify_statements()
>  
> 
>   File 
> "/tmp/build/5988fb0a/pgadmin-repo/web/pgadmin/feature_tests/query_tool_tests.py",
>  line 643, in _query_tool_notify_statements
>  
> 
> '//div[contains(@class, "sql-editor-message") and '
>  
> 
>   File 
> "/tmp/build/5988fb0a/pgadmin-repo/web/regression/feature_utils/pgadmin_page.py",
>  line 169, in find_by_xpath
>  
> 
> lambda driver: driver.find_element_by_xpath(xpath)
>  
> 
>   File 
> "/tmp/build/5988fb0a/pgadmin-repo/web/regression/feature_utils/pgadmin_page.py",
>  line 261, in wait_for_element
>  
> 
> return self._wait_for("element to exist", element_if_it_exists)
>  
> 
>   File 
> "/tmp/build/5988fb0a/pgadmin-repo/web/regression/feature_utils/pgadmin_page.py",
>  line 327, in _wait_for
>  
> 
> "Timed out waiting for " + waiting_for_message
>  
> 
>   File 
> "/root/.pyenv/versions/pgadmin/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
>  line 80, in until
>  
> 
> raise TimeoutException(message, screen, stacktrace)
>  
> 
> 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.

>
> Sincerely,
>
> Victoria & Joao
>
> On Tue, May 15, 2018 at 6:01 AM Akshay Joshi <
> akshay.jo...@enterprisedb.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*
>>
>


Re: [pgadmin4][patch] Initial patch to decouple from ACI Tree

2018-05-15 Thread Joao De Almeida Pereira
Hello Ashesh,

These are our comments to the patch:


   -

   Can you explain the reasoning behind the change you did on the canCreate
   function?
   Bind creates a new instance of a function, do we really need that?
   -

   isValidTreeNodeData
   1. If it is not Null or Undefined it really means that the data is
  Valid? Shouldn’t it be isDataDefined?
  2. This looks like a generic function that could be used with objects
  of any type not specific to TreeNodeData. So the file location
doesn’t look
  correct.
   -

   The tree folder is just a Tree that we use to store information. The
   menu uses a Tree but the 2 things should be separated.
   In our point of view the current entanglement of the ACITree into our
   code came from missing concepts into a single place (Menu + Storage of
   information).
   The idea behind having the Tree as a separate block was to ensure that
   we do not have the Menu and Tree coupling.
   -

   supportedNodesMenu.enabled what it does it check if a Node Menu should
   be enabled or not. The name of it maybe should be nodeMenu.enabled?

​


Thanks
Victoria & Joao

On Tue, May 15, 2018 at 6:37 AM Ashesh Vashi 
wrote:

> Hi Joao,
> On Mon, May 14, 2018 at 6:11 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>>
>> On Mon, May 14, 2018 at 6:10 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Mon, May 14, 2018 at 1:38 PM, Ashesh Vashi <
>>> ashesh.va...@enterprisedb.com> wrote:
>>>
 On Mon, May 14, 2018 at 2:59 PM, Dave Page  wrote:

>
>
> On Sat, May 12, 2018 at 12:10 AM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>> On Sat, May 12, 2018, 02:58 Joao De Almeida Pereira <
>> jdealmeidapere...@pivotal.io> wrote:
>>
>>> Hello Ashesh,
>>>
>>> 1. In TreeNode, we're keepging the reference of DOMElement, do we
> really need it?

 As of right now, our Tree abstraction acts as an adapter to the
> aciTree library. The aciTree library needs the domElement for most of 
> its
> functions (setInode, unload, etc). Thus this is the easiest way to
> introduce our abstraction and keep the functionality as before - at 
> least
> until we decide that whether we want to switch out the library or not.

 I understand that. But - I've not seen any reference of domElement
 the code yet, hence - pointed that out.
>>>
>>> If you look at the function: reload, unload you will see that
>>> domNode is used to communicate with the ACITree
>>> ​
>>>
 2. Are you expecting the tree class to be a singleton class

 Since this tree is referenced throughout the codebase, considering
> it to be a singleton seems like the most appropriate pattern for this
> usecase. It is very much the same way how we create a single instance 
> of
> the aciTree library and use that throughout the codebase. Moreover, it
> opens up opportunities to improve performance, for example caching 
> lockups
> of nodes. I’m not a fan of singletons myself, but I feel like we’re 
> simply
> keeping the architecture the same in the instance.

 Yeah - I don't see any usage of tree object from anywhere.
 And, we're already creating new object in browser.js (and, not
 utitlizing that instance anywhere.)
>>>
>>>
>>> You are right, we do not need to export tree as a singleton for now.
>>> The line that exports the variable tree can be remove when applying
>>> the patch number 2.
>>> ​
>>>
>>> I think we addressed all the concern raised about this patch. Does
>>> this mean that the patch is going to get committed?
>>>
>> Yes - from me for 0002.
>>
>
> Can you do that today?
>
 Done.

>>>
>>> Great, thanks!
>>>
>>> On to patch 0003 then :-)
>>>
>> Yes - already working on it! :-)
>>
> Majority part of the 0003 patch looks good to me.
> Except choice of the path of some of the file, and name of the functions.
>
> Please find the updated patch.
> I've moved files under the 'pgadmin/static/js/menu' directory under the
> 'pgadmin/static/js/tree', as they're using tree functionalities directly.
>
> Please review it, and let me know your concern.
>
> -- Thanks, Ashesh
>
>>
>> -- Thanks, Ashesh
>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>


Re: [pgAdmin4][Patch] Feature #3270 Add support for running regression tests against Firefox

2018-05-15 Thread Khushboo Vashi
On Tue, 15 May 2018, 19:56 Dave Page,  wrote:

>
>
> On Tue, May 15, 2018 at 3:24 PM, Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Tue, 15 May 2018, 19:40 Dave Page,  wrote:
>>
>>>
>>>
>>> On Tue, May 15, 2018 at 1:45 PM, Aditya Toshniwal <
>>> aditya.toshni...@enterprisedb.com> wrote:
>>>

 On Tue, May 15, 2018 at 6:05 PM, Dave Page  wrote:

> Hi
>
> On Tue, May 15, 2018 at 1:24 PM, Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> I suggest check which keyboard you are using, US or UK. If UK, try
>> with US keyboard.(might work)
>>
>
> How would that make any difference? (and yes, I am using a UK
> keyboard).
>

 There are few cases reported in Selenium github where they are facing
 issues for non-US keyboard layouts. Refer below link,
 https://github.com/SeleniumHQ/selenium/issues/5051

 It is possible the issues still exist and so we can try with US
 keyboard once.

>>>
>>> Hmm, interesting. I checked in the Keyboard Preferences on my mac, and
>>> it said I had a US input device. I added UK as well, and even though it
>>> makes no difference to the keyboard that I can see, that test does now seem
>>> to be passing.
>>>
>>> So, I'm not really sure what's going on...
>>>
>>> Anyway, it works so patch applied. Thanks!
>>>
>>>
>> I have also tried this same thing but it didn't work for me. Still I am
>> facing the same issue with Ubuntu.
>>
>
> Oh - the exact same failure? What do you get in the query text when it
> errors?
>
Yes, the same error you were getting.


>
>
>>
>
>>
>> Thanks and Regards,
>> Aditya Toshniwal
>> Software Engineer | EnterpriseDB Software Solutions | Pune
>> "Don't Complain about Heat, Plant a tree"
>>
>> On Tue, May 15, 2018 at 11:35 AM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Dave
>>>
>>> On Mon, May 14, 2018 at 6:33 PM, Dave Page 
>>> wrote:
>>>


 On Mon, May 14, 2018 at 2:03 PM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

> Hi Dave
>
> On which database server you are running this test cases, I have
> tested it on PG 9.6
>

 PG 9.4.

>>>
>>>I have tested it with PG 9.4 on Mac OSX and Ubuntu 16, working
>>> absolutely fine. Can you please provide the *postgresql.conf* is
>>> there any parameter changed? OR is there any change in "datatype
>>> _test.json" file ?
>>>


>
> On Mon, May 14, 2018 at 5:45 PM, Dave Page 
> wrote:
>
>>
>> Hi
>>
>> On Mon, May 14, 2018 at 7:29 AM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Anthony
>>>
>>> Thanks for updated patch, it is working fine on my machine. I
>>> have tested it couple of times.
>>>
>>>
>> I've tested it a couple of times and still see the pgDataType
>> failure. I've attached the screenshot; I have to wonder why that 
>> test is
>> throwing a syntax error at all as it's only supposed to test that we
>> display different datatypes correctly. Looking further, it seems 
>> that it's
>> trying to execute a badly corrupted query. How did it get that way? 
>> Do we
>> need to clear the CodeMirror box before trying to replace the query?
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> *Akshay Joshi*
>
> *Sr. Software Architect *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>



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

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

>>>
>>>
>>>
>>> --
>>> *Akshay Joshi*
>>>
>>> *Sr. Software Architect *
>>>
>>>
>>>
>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>>
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>
>
> --
> 

Re: [pgAdmin4][Patch] Feature #3270 Add support for running regression tests against Firefox

2018-05-15 Thread Dave Page
On Tue, May 15, 2018 at 3:24 PM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

>
>
> On Tue, 15 May 2018, 19:40 Dave Page,  wrote:
>
>>
>>
>> On Tue, May 15, 2018 at 1:45 PM, Aditya Toshniwal > enterprisedb.com> wrote:
>>
>>>
>>> On Tue, May 15, 2018 at 6:05 PM, Dave Page  wrote:
>>>
 Hi

 On Tue, May 15, 2018 at 1:24 PM, Aditya Toshniwal  wrote:

> Hi Dave,
>
> I suggest check which keyboard you are using, US or UK. If UK, try
> with US keyboard.(might work)
>

 How would that make any difference? (and yes, I am using a UK keyboard).

>>>
>>> There are few cases reported in Selenium github where they are facing
>>> issues for non-US keyboard layouts. Refer below link,
>>> https://github.com/SeleniumHQ/selenium/issues/5051
>>>
>>> It is possible the issues still exist and so we can try with US keyboard
>>> once.
>>>
>>
>> Hmm, interesting. I checked in the Keyboard Preferences on my mac, and it
>> said I had a US input device. I added UK as well, and even though it makes
>> no difference to the keyboard that I can see, that test does now seem to be
>> passing.
>>
>> So, I'm not really sure what's going on...
>>
>> Anyway, it works so patch applied. Thanks!
>>
>>
> I have also tried this same thing but it didn't work for me. Still I am
> facing the same issue with Ubuntu.
>

Oh - the exact same failure? What do you get in the query text when it
errors?



>

>
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"
>
> On Tue, May 15, 2018 at 11:35 AM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Dave
>>
>> On Mon, May 14, 2018 at 6:33 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Mon, May 14, 2018 at 2:03 PM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi Dave

 On which database server you are running this test cases, I have
 tested it on PG 9.6

>>>
>>> PG 9.4.
>>>
>>
>>I have tested it with PG 9.4 on Mac OSX and Ubuntu 16, working
>> absolutely fine. Can you please provide the *postgresql.conf* is
>> there any parameter changed? OR is there any change in "datatype
>> _test.json" file ?
>>
>>>
>>>

 On Mon, May 14, 2018 at 5:45 PM, Dave Page 
 wrote:

>
> Hi
>
> On Mon, May 14, 2018 at 7:29 AM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Anthony
>>
>> Thanks for updated patch, it is working fine on my machine. I
>> have tested it couple of times.
>>
>>
> I've tested it a couple of times and still see the pgDataType
> failure. I've attached the screenshot; I have to wonder why that test 
> is
> throwing a syntax error at all as it's only supposed to test that we
> display different datatypes correctly. Looking further, it seems that 
> it's
> trying to execute a badly corrupted query. How did it get that way? 
> Do we
> need to clear the CodeMirror box before trying to replace the query?
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



 --
 *Akshay Joshi*

 *Sr. Software Architect *



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

>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> *Akshay Joshi*
>>
>> *Sr. Software Architect *
>>
>>
>>
>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>
>
>


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

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

>>>
>>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>


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

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


Re: [pgAdmin4][Patch] Feature #3270 Add support for running regression tests against Firefox

2018-05-15 Thread Khushboo Vashi
On Tue, 15 May 2018, 19:40 Dave Page,  wrote:

>
>
> On Tue, May 15, 2018 at 1:45 PM, Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>>
>> On Tue, May 15, 2018 at 6:05 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Tue, May 15, 2018 at 1:24 PM, Aditya Toshniwal <
>>> aditya.toshni...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 I suggest check which keyboard you are using, US or UK. If UK, try with
 US keyboard.(might work)

>>>
>>> How would that make any difference? (and yes, I am using a UK keyboard).
>>>
>>
>> There are few cases reported in Selenium github where they are facing
>> issues for non-US keyboard layouts. Refer below link,
>> https://github.com/SeleniumHQ/selenium/issues/5051
>>
>> It is possible the issues still exist and so we can try with US keyboard
>> once.
>>
>
> Hmm, interesting. I checked in the Keyboard Preferences on my mac, and it
> said I had a US input device. I added UK as well, and even though it makes
> no difference to the keyboard that I can see, that test does now seem to be
> passing.
>
> So, I'm not really sure what's going on...
>
> Anyway, it works so patch applied. Thanks!
>
>
I have also tried this same thing but it didn't work for me. Still I am
facing the same issue with Ubuntu.

>
>>>

 Thanks and Regards,
 Aditya Toshniwal
 Software Engineer | EnterpriseDB Software Solutions | Pune
 "Don't Complain about Heat, Plant a tree"

 On Tue, May 15, 2018 at 11:35 AM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

> Hi Dave
>
> On Mon, May 14, 2018 at 6:33 PM, Dave Page  wrote:
>
>>
>>
>> On Mon, May 14, 2018 at 2:03 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Dave
>>>
>>> On which database server you are running this test cases, I have
>>> tested it on PG 9.6
>>>
>>
>> PG 9.4.
>>
>
>I have tested it with PG 9.4 on Mac OSX and Ubuntu 16, working
> absolutely fine. Can you please provide the *postgresql.conf* is
> there any parameter changed? OR is there any change in "datatype_test.
> json" file ?
>
>>
>>
>>>
>>> On Mon, May 14, 2018 at 5:45 PM, Dave Page 
>>> wrote:
>>>

 Hi

 On Mon, May 14, 2018 at 7:29 AM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

> Hi Anthony
>
> Thanks for updated patch, it is working fine on my machine. I have
> tested it couple of times.
>
>
 I've tested it a couple of times and still see the pgDataType
 failure. I've attached the screenshot; I have to wonder why that test 
 is
 throwing a syntax error at all as it's only supposed to test that we
 display different datatypes correctly. Looking further, it seems that 
 it's
 trying to execute a badly corrupted query. How did it get that way? Do 
 we
 need to clear the CodeMirror box before trying to replace the query?

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

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

>>>
>>>
>>>
>>> --
>>> *Akshay Joshi*
>>>
>>> *Sr. Software Architect *
>>>
>>>
>>>
>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>>
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> *Akshay Joshi*
>
> *Sr. Software Architect *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>


>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


pgAdmin 4 commit: Support running feature tests against Firefox. Fixes

2018-05-15 Thread Dave Page
Support running feature tests against Firefox. Fixes #3270

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=ccf58570b15b6b5bde750a83582bec5febe9fa18
Author: Akshay Joshi 

Modified Files
--
.gitignore |  1 +
.../copy_selected_query_results_feature_test.py|  2 +-
web/pgadmin/feature_tests/view_data_dml_queries.py |  2 +
.../feature_tests/xss_checks_file_manager_test.py  | 14 +-
web/regression/README  | 11 -
web/regression/feature_utils/app_starter.py| 25 --
web/regression/feature_utils/pgadmin_page.py   | 10 
web/regression/runtests.py | 53 ++
web/regression/test_config.json.in |  1 +
9 files changed, 104 insertions(+), 15 deletions(-)



Re: [pgAdmin4][Patch] Feature #3270 Add support for running regression tests against Firefox

2018-05-15 Thread Dave Page
On Tue, May 15, 2018 at 1:45 PM, Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

>
> On Tue, May 15, 2018 at 6:05 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Tue, May 15, 2018 at 1:24 PM, Aditya Toshniwal <
>> aditya.toshni...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> I suggest check which keyboard you are using, US or UK. If UK, try with
>>> US keyboard.(might work)
>>>
>>
>> How would that make any difference? (and yes, I am using a UK keyboard).
>>
>
> There are few cases reported in Selenium github where they are facing
> issues for non-US keyboard layouts. Refer below link,
> https://github.com/SeleniumHQ/selenium/issues/5051
>
> It is possible the issues still exist and so we can try with US keyboard
> once.
>

Hmm, interesting. I checked in the Keyboard Preferences on my mac, and it
said I had a US input device. I added UK as well, and even though it makes
no difference to the keyboard that I can see, that test does now seem to be
passing.

So, I'm not really sure what's going on...

Anyway, it works so patch applied. Thanks!


>
>>
>>>
>>> Thanks and Regards,
>>> Aditya Toshniwal
>>> Software Engineer | EnterpriseDB Software Solutions | Pune
>>> "Don't Complain about Heat, Plant a tree"
>>>
>>> On Tue, May 15, 2018 at 11:35 AM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi Dave

 On Mon, May 14, 2018 at 6:33 PM, Dave Page  wrote:

>
>
> On Mon, May 14, 2018 at 2:03 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Dave
>>
>> On which database server you are running this test cases, I have
>> tested it on PG 9.6
>>
>
> PG 9.4.
>

I have tested it with PG 9.4 on Mac OSX and Ubuntu 16, working
 absolutely fine. Can you please provide the *postgresql.conf* is there
 any parameter changed? OR is there any change in "datatype_test.json"
 file ?

>
>
>>
>> On Mon, May 14, 2018 at 5:45 PM, Dave Page  wrote:
>>
>>>
>>> Hi
>>>
>>> On Mon, May 14, 2018 at 7:29 AM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi Anthony

 Thanks for updated patch, it is working fine on my machine. I have
 tested it couple of times.


>>> I've tested it a couple of times and still see the pgDataType
>>> failure. I've attached the screenshot; I have to wonder why that test is
>>> throwing a syntax error at all as it's only supposed to test that we
>>> display different datatypes correctly. Looking further, it seems that 
>>> it's
>>> trying to execute a badly corrupted query. How did it get that way? Do 
>>> we
>>> need to clear the CodeMirror box before trying to replace the query?
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> *Akshay Joshi*
>>
>> *Sr. Software Architect *
>>
>>
>>
>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



 --
 *Akshay Joshi*

 *Sr. Software Architect *



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

>>>
>>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


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

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


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

2018-05-15 Thread Joao De Almeida Pereira
Hi Akshay,

This patch is flaky; it doesn't always pass the tests in our pipeline.

==
 

ERROR: runTest (pgadmin.feature_tests.query_tool_tests.QueryToolFeatureTest)
 

Query tool feature test
 

--
 

Traceback (most recent call last):
 

  File 
"/tmp/build/5988fb0a/pgadmin-repo/web/pgadmin/feature_tests/query_tool_tests.py",
line 101, in runTest
 

self._query_tool_notify_statements()
 

  File 
"/tmp/build/5988fb0a/pgadmin-repo/web/pgadmin/feature_tests/query_tool_tests.py",
line 643, in _query_tool_notify_statements
 

'//div[contains(@class, "sql-editor-message") and '
 

  File 
"/tmp/build/5988fb0a/pgadmin-repo/web/regression/feature_utils/pgadmin_page.py",
line 169, in find_by_xpath
 

lambda driver: driver.find_element_by_xpath(xpath)
 

  File 
"/tmp/build/5988fb0a/pgadmin-repo/web/regression/feature_utils/pgadmin_page.py",
line 261, in wait_for_element
 

return self._wait_for("element to exist", element_if_it_exists)
 

  File 
"/tmp/build/5988fb0a/pgadmin-repo/web/regression/feature_utils/pgadmin_page.py",
line 327, in _wait_for
 

"Timed out waiting for " + waiting_for_message
 

  File 
"/root/.pyenv/versions/pgadmin/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
line 80, in until
 

raise TimeoutException(message, screen, stacktrace)
 

TimeoutException: Message: Timed out waiting for element to exist


All the failures are related to query_tool_notify_statements.  Please take
another look.

Sincerely,

Victoria & Joao

On Tue, May 15, 2018 at 6:01 AM Akshay Joshi 
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*
>


Re: [pgAdmin4][Patch]: Minor JS Fix

2018-05-15 Thread Joao De Almeida Pereira
Hi,
The code looks fine, all tests pass and linter.

Once again, not to sound like a broken record, we could have done some much
more to improve our code base
Why didn't we extract that function into a more testable place?

In order for the code to become more clean and modular, we should try to
always write tests whenever we make changes to the code, even if that means
extracting a small portion (ie. the onLoad function)

Thanks
Victoria & Joao

On Tue, May 15, 2018 at 12:44 AM Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached monir patch to fix the JS issue.
>
> Thanks,
> Khushboo
>


Re: [pgAdmin4][Patch] Feature #3270 Add support for running regression tests against Firefox

2018-05-15 Thread Aditya Toshniwal
On Tue, May 15, 2018 at 6:05 PM, Dave Page  wrote:

> Hi
>
> On Tue, May 15, 2018 at 1:24 PM, Aditya Toshniwal  enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> I suggest check which keyboard you are using, US or UK. If UK, try with
>> US keyboard.(might work)
>>
>
> How would that make any difference? (and yes, I am using a UK keyboard).
>

There are few cases reported in Selenium github where they are facing
issues for non-US keyboard layouts. Refer below link,
https://github.com/SeleniumHQ/selenium/issues/5051

It is possible the issues still exist and so we can try with US keyboard
once.

>
>
>>
>> Thanks and Regards,
>> Aditya Toshniwal
>> Software Engineer | EnterpriseDB Software Solutions | Pune
>> "Don't Complain about Heat, Plant a tree"
>>
>> On Tue, May 15, 2018 at 11:35 AM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Dave
>>>
>>> On Mon, May 14, 2018 at 6:33 PM, Dave Page  wrote:
>>>


 On Mon, May 14, 2018 at 2:03 PM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

> Hi Dave
>
> On which database server you are running this test cases, I have
> tested it on PG 9.6
>

 PG 9.4.

>>>
>>>I have tested it with PG 9.4 on Mac OSX and Ubuntu 16, working
>>> absolutely fine. Can you please provide the *postgresql.conf* is there
>>> any parameter changed? OR is there any change in "datatype_test.json"
>>> file ?
>>>


>
> On Mon, May 14, 2018 at 5:45 PM, Dave Page  wrote:
>
>>
>> Hi
>>
>> On Mon, May 14, 2018 at 7:29 AM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Anthony
>>>
>>> Thanks for updated patch, it is working fine on my machine. I have
>>> tested it couple of times.
>>>
>>>
>> I've tested it a couple of times and still see the pgDataType
>> failure. I've attached the screenshot; I have to wonder why that test is
>> throwing a syntax error at all as it's only supposed to test that we
>> display different datatypes correctly. Looking further, it seems that 
>> it's
>> trying to execute a badly corrupted query. How did it get that way? Do we
>> need to clear the CodeMirror box before trying to replace the query?
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> *Akshay Joshi*
>
> *Sr. Software Architect *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>



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

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

>>>
>>>
>>>
>>> --
>>> *Akshay Joshi*
>>>
>>> *Sr. Software Architect *
>>>
>>>
>>>
>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>>
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgAdmin4][Patch] Feature #3270 Add support for running regression tests against Firefox

2018-05-15 Thread Dave Page
Hi

On Tue, May 15, 2018 at 1:24 PM, Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Dave,
>
> I suggest check which keyboard you are using, US or UK. If UK, try with US
> keyboard.(might work)
>

How would that make any difference? (and yes, I am using a UK keyboard).


>
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"
>
> On Tue, May 15, 2018 at 11:35 AM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Dave
>>
>> On Mon, May 14, 2018 at 6:33 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Mon, May 14, 2018 at 2:03 PM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi Dave

 On which database server you are running this test cases, I have tested
 it on PG 9.6

>>>
>>> PG 9.4.
>>>
>>
>>I have tested it with PG 9.4 on Mac OSX and Ubuntu 16, working
>> absolutely fine. Can you please provide the *postgresql.conf* is there
>> any parameter changed? OR is there any change in "datatype_test.json"
>> file ?
>>
>>>
>>>

 On Mon, May 14, 2018 at 5:45 PM, Dave Page  wrote:

>
> Hi
>
> On Mon, May 14, 2018 at 7:29 AM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Anthony
>>
>> Thanks for updated patch, it is working fine on my machine. I have
>> tested it couple of times.
>>
>>
> I've tested it a couple of times and still see the pgDataType failure.
> I've attached the screenshot; I have to wonder why that test is throwing a
> syntax error at all as it's only supposed to test that we display 
> different
> datatypes correctly. Looking further, it seems that it's trying to execute
> a badly corrupted query. How did it get that way? Do we need to clear the
> CodeMirror box before trying to replace the query?
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



 --
 *Akshay Joshi*

 *Sr. Software Architect *



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

>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> *Akshay Joshi*
>>
>> *Sr. Software Architect *
>>
>>
>>
>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>
>
>


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

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


Re: [pgAdmin4][Patch] Feature #3270 Add support for running regression tests against Firefox

2018-05-15 Thread Dave Page
Hi

On Tue, May 15, 2018 at 7:05 AM, Akshay Joshi  wrote:

> Hi Dave
>
> On Mon, May 14, 2018 at 6:33 PM, Dave Page  wrote:
>
>>
>>
>> On Mon, May 14, 2018 at 2:03 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Dave
>>>
>>> On which database server you are running this test cases, I have tested
>>> it on PG 9.6
>>>
>>
>> PG 9.4.
>>
>
>I have tested it with PG 9.4 on Mac OSX and Ubuntu 16, working
> absolutely fine. Can you please provide the *postgresql.conf* is there
> any parameter changed? OR is there any change in "datatype_test.json"
> file ?
>

postgresql.conf attached (though there's nothing unusual in it afaics).
There are no changes in datatype_test.json.

Server is PostgreSQL 9.4.10 on x86_64-apple-darwin, compiled by
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build
5658) (LLVM build 2336.11.00), 64-bit

Cluster encoding is UTF-8, locale is C.


>
>>
>>>
>>> On Mon, May 14, 2018 at 5:45 PM, Dave Page  wrote:
>>>

 Hi

 On Mon, May 14, 2018 at 7:29 AM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

> Hi Anthony
>
> Thanks for updated patch, it is working fine on my machine. I have
> tested it couple of times.
>
>
 I've tested it a couple of times and still see the pgDataType failure.
 I've attached the screenshot; I have to wonder why that test is throwing a
 syntax error at all as it's only supposed to test that we display different
 datatypes correctly. Looking further, it seems that it's trying to execute
 a badly corrupted query. How did it get that way? Do we need to clear the
 CodeMirror box before trying to replace the query?

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

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

>>>
>>>
>>>
>>> --
>>> *Akshay Joshi*
>>>
>>> *Sr. Software Architect *
>>>
>>>
>>>
>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>>
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> *Akshay Joshi*
>
> *Sr. Software Architect *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>



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

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


postgresql.conf
Description: Binary data


Re: [pgAdmin4][Patch] Feature #3270 Add support for running regression tests against Firefox

2018-05-15 Thread Aditya Toshniwal
Hi Dave,

I suggest check which keyboard you are using, US or UK. If UK, try with US
keyboard.(might work)

Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB Software Solutions | Pune
"Don't Complain about Heat, Plant a tree"

On Tue, May 15, 2018 at 11:35 AM, Akshay Joshi <
akshay.jo...@enterprisedb.com> wrote:

> Hi Dave
>
> On Mon, May 14, 2018 at 6:33 PM, Dave Page  wrote:
>
>>
>>
>> On Mon, May 14, 2018 at 2:03 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Dave
>>>
>>> On which database server you are running this test cases, I have tested
>>> it on PG 9.6
>>>
>>
>> PG 9.4.
>>
>
>I have tested it with PG 9.4 on Mac OSX and Ubuntu 16, working
> absolutely fine. Can you please provide the *postgresql.conf* is there
> any parameter changed? OR is there any change in "datatype_test.json"
> file ?
>
>>
>>
>>>
>>> On Mon, May 14, 2018 at 5:45 PM, Dave Page  wrote:
>>>

 Hi

 On Mon, May 14, 2018 at 7:29 AM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

> Hi Anthony
>
> Thanks for updated patch, it is working fine on my machine. I have
> tested it couple of times.
>
>
 I've tested it a couple of times and still see the pgDataType failure.
 I've attached the screenshot; I have to wonder why that test is throwing a
 syntax error at all as it's only supposed to test that we display different
 datatypes correctly. Looking further, it seems that it's trying to execute
 a badly corrupted query. How did it get that way? Do we need to clear the
 CodeMirror box before trying to replace the query?

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

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

>>>
>>>
>>>
>>> --
>>> *Akshay Joshi*
>>>
>>> *Sr. Software Architect *
>>>
>>>
>>>
>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>>
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
>
> --
> *Akshay Joshi*
>
> *Sr. Software Architect *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>


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

2018-05-15 Thread Akshay Joshi
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*


RM_3204.patch
Description: Binary data


Re: [pgAdmin4][Patch] Feature #3270 Add support for running regression tests against Firefox

2018-05-15 Thread Akshay Joshi
Hi Dave

On Mon, May 14, 2018 at 6:33 PM, Dave Page  wrote:

>
>
> On Mon, May 14, 2018 at 2:03 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Dave
>>
>> On which database server you are running this test cases, I have tested
>> it on PG 9.6
>>
>
> PG 9.4.
>

   I have tested it with PG 9.4 on Mac OSX and Ubuntu 16, working
absolutely fine. Can you please provide the *postgresql.conf* is there any
parameter changed? OR is there any change in "datatype_test.json" file ?

>
>
>>
>> On Mon, May 14, 2018 at 5:45 PM, Dave Page  wrote:
>>
>>>
>>> Hi
>>>
>>> On Mon, May 14, 2018 at 7:29 AM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi Anthony

 Thanks for updated patch, it is working fine on my machine. I have
 tested it couple of times.


>>> I've tested it a couple of times and still see the pgDataType failure.
>>> I've attached the screenshot; I have to wonder why that test is throwing a
>>> syntax error at all as it's only supposed to test that we display different
>>> datatypes correctly. Looking further, it seems that it's trying to execute
>>> a badly corrupted query. How did it get that way? Do we need to clear the
>>> CodeMirror box before trying to replace the query?
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> *Akshay Joshi*
>>
>> *Sr. Software Architect *
>>
>>
>>
>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
*Akshay Joshi*

*Sr. Software Architect *



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