Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8hfh-0008Oo-49 for pgadmin-hackers@arkaria.postgresql.org; Thu, 11 May 2017 06:33:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d8hfg-0007gp-Ny for pgadmin-hackers@arkaria.postgresql.org; Thu, 11 May 2017 06:33:56 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d8hfg-0007gf-1I for pgadmin-hackers@postgresql.org; Thu, 11 May 2017 06:33:56 +0000 Received: from mail-wr0-x22d.google.com ([2a00:1450:400c:c0c::22d]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d8hfc-0000rb-1J for pgadmin-hackers@postgresql.org; Thu, 11 May 2017 06:33:54 +0000 Received: by mail-wr0-x22d.google.com with SMTP id z52so12097678wrc.2 for ; Wed, 10 May 2017 23:33:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rMNB3lDczFjSQeXOC4mHa7yfXB/6R2tpTXlf3WH3Ah4=; b=0lNLI7i4uTc9pn08bMjUtQUb0hIsSriJNkeXK7OcKixxqgCSDTa+AGz5xE5vp5wJvD nuYttYXwGpIdFORzr+iTqX5bsdVSwsHk+k6xirIScHgscC/db/zt/jTVjRTk5yz+ITuX BphEKiCnInHCqgUp1GxsqmIKiR86zdLg10g+K5oMK96WDjaKbVxQqxYm7pMj9nOa2VPV oV3O1aqI0b7+TUQpWSwZIcYSpjDzmQ8H77SjmGJ3Cdlt5Xn7QFxy2KACgGSmaX9J5uo/ 9r8CdHmx+fr5vzyDE8k17VtkPhjqSvirHc/0CTc/TLv/U7Z1yDmdh07S2X9z5O1teXVN WELw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rMNB3lDczFjSQeXOC4mHa7yfXB/6R2tpTXlf3WH3Ah4=; b=WzuJhiIBxu442xvi6O9WPZSQlBDblHI2EO/2E+6DDwpszrEPw1eGlEOq+DJJvheIl7 RXjgHeIJXipIZE2j2axakX0Q/VVVOPu2dB+0laZVhd+gcUfgyPGRKD/sbVJF6Ho7Y1sX pvugft7e3ijpaeihrOTdkqjRiBdbBZI47fzboDacAD7xT7nwLS44wvGQBL0pE3+7+Wkd rgpmAMnT90LFmUgK3vzgNiiOi4gZ/OFVUAArjf5PJgtOa9nBML3p9ZbdxGgZu4i/QzWk JwWGpASLzsTKgtyXWISYDghI100EM6G/iAIh5rOQgdYYKqmA9+gIYtJFz1MKnAhXBKuY UrwA== X-Gm-Message-State: AODbwcA1qyI+WCdgDJqRybD3KvRX5W5oQyQ4eZYI3NMm1IH0eGF6FjmC hgktKZHJ1hzh/OupxU0= X-Received: by 10.223.170.74 with SMTP id q10mr6433548wrd.171.1494484429475; Wed, 10 May 2017 23:33:49 -0700 (PDT) Received: from [100.101.193.117] ([213.205.198.201]) by smtp.gmail.com with ESMTPSA id r60sm1005323wrb.37.2017.05.10.23.33.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 May 2017 23:33:48 -0700 (PDT) Content-Type: multipart/alternative; boundary=Apple-Mail-455F6AC9-367C-4E24-97B5-4ABAD9E93AA1 Mime-Version: 1.0 (1.0) Subject: Re: [patch] Dependents and Dependencies in GreenPlum From: Dave Page X-Mailer: iPhone Mail (14E304) In-Reply-To: Date: Thu, 11 May 2017 07:33:47 +0100 Cc: Sarah McAlear , Joao Pedro De Almeida Pereira , Robert Eckhardt , Matthew Kleiman , Ashesh Vashi , pgadmin-hackers Content-Transfer-Encoding: 7bit Message-Id: <19B13ECE-CA6A-48E7-BF70-264F490F40B4@pgadmin.org> References: To: Akshay Joshi X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --Apple-Mail-455F6AC9-367C-4E24-97B5-4ABAD9E93AA1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > On 11 May 2017, at 07:11, Akshay Joshi wro= te: >=20 > Hi Sarah >=20 >> On Thu, May 11, 2017 at 2:30 AM, Sarah McAlear wrot= e: >> Hi Ashkay! >>=20 >>> TestTablesNodeSql hasn't failed but TestRoleDependenciesSql failed with b= elow error: >>> .....\test_role_dependencies_sql.py\", line 41, in assertions\n self= .assertEqual(1, len(fetch_result))\nAssertionError: 1 !=3D 0 >>=20 >>=20 >> We experienced a similar problem when we started developing this patch. W= e noticed that we were connecting to the database with the super user (the d= b owner user), which did not create the role we are expecting when a table i= s created. To ensure that this role is created, we had to create a new user a= nd use it to execute all the tests. After we made this change, the tests pas= sed.=20 >>=20 >> Can you try to create a new user and use it to execute your tests? >=20 > I did that and it works. I have created new user 'test' with superuser= privileges and update parameter db_username=3D"test" in test_config.json fi= le. But still I am unable to understand why it doesn't work with 'postgres' (= default) user? =20 Agreed. That suggests something fishy is going on that should be understood.= >>=20 >> Thanks, >> Jo=C3=A3o & Sarah >>=20 >>> On Wed, May 10, 2017 at 1:56 PM, Akshay Joshi wrote: >>>=20 >>>=20 >>> On May 10, 2017 19:07, "Sarah McAlear" wrote: >>> Hi Akshay! >>>=20 >>> Does this error occur on 9.6 or 10.0? We tested it in 9.6 and all our te= sts pass. >>>=20 >>> On both 9.6 and 10.0. Query returned 0 rows which is compared agains= t 1 in assert statement.=20 >>>=20 >>> Thanks! >>> Jo=C3=A3o & Sarah >>>=20 >>>> On Wed, May 10, 2017 at 2:29 AM, Akshay Joshi wrote: >>>> Hi Sarah >>>>=20 >>>>> On Tue, May 9, 2017 at 9:03 PM, Sarah McAlear wr= ote: >>>>> Hi Akshay! >>>>> =20 >>>>>> Some test file names ended with "_sql_template.py" do we need to add t= hat string ?=20 >>>>>=20 >>>>> we added this suffix after moving the tests up a level to tables/tests= to clarify what subject they applied to. we changed the suffix to "_sql.py"= >>>>>=20 >>>>>> - Files "test_column_acl_sql_template.py" and "test_column_properties= _sql_template.py" should be moved from tables->tests to tables->column->test= s. As it's related to column. >>>>>> - Files "test_trigger_get_oid_sql_template.py" and "test_trigger_node= s_sql_template.py" should be moved from tables->tests to tables->triggers->t= ests. As its related to triggers. >>>>> these tests are related to the sql files in tables/templates/column, n= ot tables/column, so moving them into tables/column would be more confusing.= =20 >>>>>=20 >>>>>> Following test cases are failing >>>>>=20 >>>>> Thank you, fixed, see new patch. Can you confirm that TestTablesNodeSq= l doesn't fail in your environment? >>>> =20 >>>> TestTablesNodeSql hasn't failed but TestRoleDependenciesSql failed w= ith below error: >>>> .....\test_role_dependencies_sql.py\", line 41, in assertions\n sel= f.assertEqual(1, len(fetch_result))\nAssertionError: 1 !=3D 0 >>>>=20 >>>>>=20 >>>>> Thanks, >>>>> George & Sarah >>>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>> --=20 >>>> Akshay Joshi >>>> Principal Software Engineer=20 >>>>=20 >>>>=20 >>>>=20 >>>> Phone: +91 20-3058-9517 >>>> Mobile: +91 976-788-8246 >>>=20 >>>=20 >>=20 >=20 >=20 >=20 > --=20 > Akshay Joshi > Principal Software Engineer=20 >=20 >=20 >=20 > Phone: +91 20-3058-9517 > Mobile: +91 976-788-8246 --Apple-Mail-455F6AC9-367C-4E24-97B5-4ABAD9E93AA1 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable


On 11 May 2017, at 07:11, Aksh= ay Joshi <akshay.joshi@e= nterprisedb.com> wrote:

<= div dir=3D"ltr">Hi Sarah

On Thu, May 11, 2017 at 2:30 AM, Sarah McAlear <<= a href=3D"mailto:smcalear@pivotal.io" target=3D"_blank">smcalear@pivotal.io<= /a>> wrote:
Hi Ashkay!

TestTablesNodeSql hasn't fa= iled but TestRoleDependenciesSql failed with below error:
    .= ....\test_role_dependencies_sql.py\", line 41, in assertions\n self.assert= Equal(1, len(fetch_result))\nAssertionError: 1 !=3D 0

We exp= erienced a similar problem when we started developing this patch. We noticed= that we were connecting to the database with the super user (the db owner u= ser), which did not create the role we are expecting when a table is created= . To ensure that this role is created, we had to create a new user and use i= t to execute all the tests. After we made this change, the tests passed.&nbs= p;

Can you try to create a new user and use it to e= xecute your tests?

   = I did that and it works. I have created new user 'test' with superuser priv= ileges and update parameter db_username=3D"test" in test_config.json file. B= ut still I am unable to understand why it doesn't work with 'postgres' (defa= ult) user?  

<= div>Agreed. That suggests something fishy is going on that should be underst= ood.


Thanks,
Jo=C3=A3o & Sarah

On Wed, May 10, 2017 at 1:56 PM, Akshay J= oshi <akshay.joshi@enterprisedb.com> wrote:


On May 10, 2017 19:07, "Sarah McAlear" <smcalear@pivotal.io> wrote:
Hi Akshay!

=
Does this error occur on 9.6 or 10.0? We tested it in 9.6 and all our t= ests pass.

    On both 9.6 and 10.0. Query retu= rned 0 rows which is compared against 1 in assert statement. 

Thanks!
Jo=C3=A3o & Sarah

On Wed, May 10, 2017 at 2:29 AM,= Akshay Joshi <akshay.joshi@enterprisedb.com>= wrote:
Hi Sarah

On Tue, May 9, 2017 at 9:03 PM, Sarah= McAlear <smcalear@pivotal.io> wrote:
Hi Akshay!
&n= bsp;
Some test file names ended with "_sql_template.py" do we need to add that string ? <= /span>
we added this suffix after moving the tests u= p a level to tables/tests to clarify what subject they applied to. we change= d the suffix to "_sql.py"

- Files "test_column_acl_sql_temp= late.py" and "test_column_prop= erties_sql_template.py" shoul= d be moved from tables->tests to tables->column->tests. As it's rel= ated to column.
- Files "test_trigger_get_oid_sql_template.py
" and "test_trigger_nodes_sql_te= mplate.py" should be moved from tables->tests t= o tables->triggers->tests. As its related to triggers.
these tests are related to the sql files in tables/templates/column= , not tables/column, so moving them into tables/column would be more confusi= ng. 

Following test cases are failing
Thank you, fixed, see new patch. Can you confirm that TestTablesNodeS= ql doesn't fail in your environment?
  &nb= sp;
    TestTablesNodeSql hasn't failed but TestR= oleDependenciesSql failed with below error:
    .....\test_role_dependencies_sql.py\", line= 41, in assertions\n self.assertEqual(1, le= n(fetch_result))\nAssertionError: 1 !=3D 0=

<= div>
Thanks,
George & Sarah

=



--
Akshay Joshi
Principal Software En= gineer 

<= b>







--
<= div class=3D"gmail_signature">
= Akshay Joshi
Principal Software Engineer&nb= sp;

=
<= /div>
Phone: +91 20= -3058-9517
Mobile: +91 976-788-8246
= --Apple-Mail-455F6AC9-367C-4E24-97B5-4ABAD9E93AA1--