Re: pgAdmin IV API test cases patch - Mailing list pgadmin-hackers

From Priyanka Shendge
Subject Re: pgAdmin IV API test cases patch
Date
Msg-id CAKmZXFRD=eUCML8ecERuS52F+TRMUJUgBKyRnmg2cKV994LjFw@mail.gmail.com
Whole thread Raw
In response to Re: pgAdmin IV API test cases patch  (Dave Page <dpage@pgadmin.org>)
Responses Re: pgAdmin IV API test cases patch  (Dave Page <dpage@pgadmin.org>)
List pgadmin-hackers
Hi Dave,

I have added more debug statements to older patch. New patch attached.
Also, i removed database deletion test case from current patch so that we can analyse 
if database is added or not. 

I have added few more debug statements to database add test case. After running the testsuite 
can you please confirm whether the database is created or not under server node?

Could you please re-run the attached patch and send me the logs and output?

On 12 July 2016 at 17:34, Dave Page <dpage@pgadmin.org> wrote:
On Tue, Jul 12, 2016 at 5:14 AM, Khushboo Vashi
<khushboo.vashi@enterprisedb.com> wrote:
>
>
> On Mon, Jul 11, 2016 at 7:15 PM, Priyanka Shendge
> <priyanka.shendge@enterprisedb.com> wrote:
>>
>>
>>
>> On 11 July 2016 at 18:35, Dave Page <dpage@pgadmin.org> wrote:
>>>
>>> On Mon, Jul 11, 2016 at 1:25 PM, Priyanka Shendge
>>> <priyanka.shendge@enterprisedb.com> wrote:
>>> > Sorry, by mistake i copied incomplete query.  There is an OID present
>>> > for
>>> > added database.
>>> >
>>> > SELECT
>>> >     db.oid as did, db.datname, db.datallowconn,
>>> >     pg_encoding_to_char(db.encoding) AS serverencoding,
>>> >     has_database_privilege(db.oid, 'CREATE') as cancreate,
>>> > datlastsysoid
>>> > FROM
>>> >     pg_database db
>>> > WHERE db.oid = 158579
>>>
>>> There's nothing wrong with that query. Can you work with Khushboo to
>>> see if she can reproduce or help figure it out please?
>>
>>
>> I had work with Khushboo, she also tried to reproduce the issue at her
>> it's working fine for her.
>> Khushboo also tried to troubleshoot/trace the issue but not able to figure
>> out where exactly its failing;
>> as issue was not reproducible.
>>
>> @Khushboo:
>>  Please add if i am missing anything.
>>>
>>>
>
>
> We have tried to reproduce this issue at our end several times with the
> different scenarios but every attempt was unsuccessful.
>
> Here the newly created database connection is failing which should not as
> the database is created properly as per the log.
> The above query (mentioned by Priyanka) executes from the psycopg2 driver
> and could fail in 2 scenarios, either the database has been dropped before
> this particular test-case runs or the database is not created properly
> through the 'create database test-case'.  But as per the log, the 'delete
> database test-case' runs after this test-case and the database is created
> properly.
>
> Can any privilege issue prevent the database connection in this scenario?

Not on my system, that I can think of.

If there was a connection error like that though, shouldn't we see a
message from libpq at least? If not, that implies that there are error
reporting issues to be fixed.


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

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



--
Best,
Priyanka

EnterpriseDB Corporation
The Enterprise PostgreSQL Company

Attachment

pgadmin-hackers by date:

Previous
From: Murtuza Zabuawala
Date:
Subject: PATCH: To fix the issue where cast function causes freeze (pgAdmin4)
Next
From: Murtuza Zabuawala
Date:
Subject: PATCH: security label is not being added/updated for MATERIALIZED VIEW