Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8hK2-0007RU-UL for pgadmin-hackers@arkaria.postgresql.org; Thu, 11 May 2017 06:11:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d8hK1-00013l-1U for pgadmin-hackers@arkaria.postgresql.org; Thu, 11 May 2017 06:11:33 +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 1d8hJl-0000dg-0Z for pgadmin-hackers@postgresql.org; Thu, 11 May 2017 06:11:17 +0000 Received: from mail-pf0-x230.google.com ([2607:f8b0:400e:c00::230]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d8hJh-0000SD-Mk for pgadmin-hackers@postgresql.org; Thu, 11 May 2017 06:11:15 +0000 Received: by mail-pf0-x230.google.com with SMTP id e64so8760736pfd.1 for ; Wed, 10 May 2017 23:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=h6iVmtUvSJI/pVDNiY6bNpkqAmSFreMYpSAONfYJbC8=; b=DPCeH2mf6CVCmIFshSAULJykrq4slyGvSQa0+4QUDSRxgDLcYoNnMMyuChv+civypj bApIMsHP1tEJQTMoTx+cQCB7N1UycBUbtpu0ATf1gxtB+x8mRriQ2w5n8Y9pSy2mCZZn WUcNmVWFOfNS2iuA9q4GTmv8ZHdNnwsSDgnFUNOvDeHEfiNU6uHJKBFB6bvqu8677CzT niYuWnCo/i4ygq+w6tWWGO+WdF67N6U05IwfamwLBfdo7XB0QA7SBIPl/BYC3TkeVm5+ n1NbGD4YOSeLNiZRVm1ZOtuiTMtefvWMlNZI3hMYl59L2DFaQJ2CfsOmE5gypg5E54po SLmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=h6iVmtUvSJI/pVDNiY6bNpkqAmSFreMYpSAONfYJbC8=; b=Lw/lJuxTbkswnPtfjpUz67vSy0r4e6H+2byhfqWegdmwVBS+Ydv+5tnfqIpELSfI7j OwBOnuhT3M1czXYIQqzbBAx7QQsyDvI57mHSJhrg3+66UzPquteXWGXVvOxGtYKysved Y1XUBs/H46F9QTCrs6tCztvukqjlGvwqyzZpOBl8IB0P5pPZgQrLv7TiaH7TUXfcievH 8FHZUuVoI/NeIV0ZJdA6RO72ntFI2BSPLMcCdYnwHcdFl/XIwKpUNMC9jnsW1EVTo+gG lTBqwMM0p1Rhy1Z4ndj6lub2Ta/EqKy6XmnmX5Rn6A4p2JH3PMIrgedE+RGpSmkqt6b4 SoEg== X-Gm-Message-State: AODbwcB/CwP0Bsuj6lLl2zcsVqLLdGPOJN2U63Wx2H0C6948pGscG+GD 2KGOaLiYNXwKg6k/NUJqaJm9A2lOizGy X-Received: by 10.99.109.129 with SMTP id i123mr10394944pgc.103.1494483072339; Wed, 10 May 2017 23:11:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.170.75 with HTTP; Wed, 10 May 2017 23:11:11 -0700 (PDT) In-Reply-To: References: From: Akshay Joshi Date: Thu, 11 May 2017 11:41:11 +0530 Message-ID: Subject: Re: [patch] Dependents and Dependencies in GreenPlum To: Sarah McAlear Cc: Joao Pedro De Almeida Pereira , Robert Eckhardt , Matthew Kleiman , Ashesh Vashi , pgadmin-hackers , Dave Page Content-Type: multipart/alternative; boundary=f403045c5052a663fa054f397486 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 --f403045c5052a663fa054f397486 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Sarah On Thu, May 11, 2017 at 2:30 AM, Sarah McAlear wrote: > Hi Ashkay! > > TestTablesNodeSql hasn't failed but TestRoleDependenciesSql failed with >> below error: >> .....\test_role_dependencies_sql.py\", line 41, in assertions\n >> self.assertEqual(1, len(fetch_result))\nAssertionError: 1 !=3D 0 > > > 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 = db > owner user), 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 it to execute all the tests. After we made this change, the tests > passed. > > Can you try to create a new user and use it to execute your tests? > 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 file. But still I am unable to understand why it doesn't work with 'postgres' (default) user? > > Thanks, > Jo=C3=A3o & Sarah > > On Wed, May 10, 2017 at 1:56 PM, Akshay Joshi < > akshay.joshi@enterprisedb.com> wrote: > >> >> >> On May 10, 2017 19:07, "Sarah McAlear" wrote: >> >> Hi Akshay! >> >> Does this error occur on 9.6 or 10.0? We tested it in 9.6 and all our >> tests pass. >> >> >> On both 9.6 and 10.0. Query returned 0 rows which is compared agains= t >> 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 >>> wrote: >>> >>>> Hi Akshay! >>>> >>>> >>>>> Some test file names ended with "*_sql_template.py*" do we need to >>>>> add that string ? >>>> >>>> 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 "_sq= l.py" >>>> >>>> - Files "test_column_acl_sql_template.py" and "test_column_properties_ >>>>> sql_template.py" should be moved from tables->tests to >>>>> tables->column->tests. As it's related to column. >>>>> - Files "test_trigger_get_oid_sql_template.py" and " >>>>> test_trigger_nodes_sql_template.py" should be moved from >>>>> tables->tests to 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 >>>> confusing. >>>> >>>> Following test cases are failing >>>> >>>> Thank you, fixed, see new patch. Can you confirm that TestTablesNodeSq= l >>>> doesn't fail in your environment? >>>> >>> >>> TestTablesNodeSql hasn't failed but TestRoleDependenciesSql failed >>> with below error: >>> .....\test_role_dependencies_sql.py\", line 41, in assertions\n >>> self.assertEqual(1, len(fetch_result))\nAssertionError: 1 !=3D 0 >>> >>> >>>> Thanks, >>>> George & Sarah >>>> >>>> >>> >>> >>> -- >>> *Akshay Joshi* >>> *Principal Software Engineer * >>> >>> >>> >>> *Phone: +91 20-3058-9517 <+91%2020%203058%209517>Mobile: +91 >>> 976-788-8246 <+91%2097678%2088246>* >>> >> >> >> > --=20 *Akshay Joshi* *Principal Software Engineer * *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* --f403045c5052a663fa054f397486 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Sarah

On Thu, May 11, 2017 at 2:30 AM, Sarah McAlear &l= t;smcalear@pivotal= .io> wrote:
Hi Ashkay!

TestTablesNodeSql= hasn't failed but TestRoleDependenciesSql failed with below error:
= =C2=A0 =C2=A0 .....\test_role_dependencies_sql.py\", line 41, in assertions\n=C2=A0self.assertEqual(1, len(fetch_result))= \nAssertionError: 1 !=3D 0

We experienced a similar problem when we started d= eveloping this patch. We noticed that we were connecting to the database wi= th the super user (the db owner user), 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 it to execute all the tests. After we mad= e this change, the tests passed.=C2=A0

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

=C2=A0 =C2=A0 I did that and it works. I have crea= ted new user 'test' with superuser privileges and update parameter = db_username=3D"test" in test_config.json file. But still I am una= ble to understand why it doesn't work with 'postgres' (default)= user? =C2=A0

Th= anks,
Jo=C3=A3o & Sarah

On Wed, May 10, 2017 at 1:56 PM, Akshay Joshi &l= t;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 tes= ts pass.

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

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 a= t 9:03 PM, Sarah McAlear <smcalear@pivotal.io> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;pa= dding-left:1ex">
Hi Akshay!
=C2=A0
Some test file names ende= d with "_sql_template.py" do we need to add that string ?=C2=A0
we added this suffix after moving the tests up a level to tables/tests t= o clarify what subject they applied to. we changed the suffix to "_sql= .py"

- Files "test_column_acl_sql_templ= ate.py" and "tes= t_column_properties_sql_template.py" should be moved from tables->tests to tables->colum= n->tests. As it's related to column.
- Files "test_trigger_get_oid_sql<= /span>_template.py" and "test_trigger_nodes_sql_template.py" should be moved from tables->tests to tables-&= gt;triggers->tests. As its related to triggers.
= these tests are related to the sql files in tables/templates/column, not ta= bles/column, so moving them into tables/column would be more confusing.=C2= =A0

Following test cases are failing
Thank you, fixed, see new patch. Can you confirm that TestTablesNode= Sql doesn't fail in your environment?
=C2= =A0 =C2=A0
=C2=A0 =C2=A0 TestTablesNodeSql hasn't fail= ed but TestRoleDependenciesSql failed with below error:
=C2=A0 = =C2=A0 .....\test_role_dependencies_sql.py\&= quot;, line 41, in assertions\n self.assertEqual(1, len(fetch_result))\nAssertionError: 1 !=3D 0


Thanks,
= George & Sarah




--
Akshay Joshi
Principal So= ftware Engineer=C2=A0
<= b>







--
=
Akshay Joshi
Principal Software Engi= neer=C2=A0

=

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