Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1evpfN-0001ls-7l for pgadmin-hackers@arkaria.postgresql.org; Tue, 13 Mar 2018 19:32:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1evpfM-0000NX-23 for pgadmin-hackers@arkaria.postgresql.org; Tue, 13 Mar 2018 19:32: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.89) (envelope-from ) id 1evpfL-0000NN-L8 for pgadmin-hackers@lists.postgresql.org; Tue, 13 Mar 2018 19:32:55 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1evpfI-0000h1-AR for pgadmin-hackers@postgresql.org; Tue, 13 Mar 2018 19:32:54 +0000 Received: by mail-wm0-x231.google.com with SMTP id h21so54336wmd.1 for ; Tue, 13 Mar 2018 12:32:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=poeaczFnobDAJDpwpk5BcsU5kSMt1iPXosOnDbOt6Fo=; b=GypKmDuHOz1FicTAgbqG927hAB61BR3bs1r+1ck1oJo2DxYTNCmAPqoDBIKO/94iqR ph48tvZl7k8i+J9h1VdtsSK4iloZwXQfmuZK80XrTJUmkPYi2N4RiPx5BRNyn97D1YwJ vv9gGJttjvKi//PPAN0l44rI8JKtXmcsHua93LyfHgYs14cQVkLQryXKOuUwpl4IInxx x02SLNna6PWvD6zw78I+XN4GJIdgJRywxbFhpjGZyjsx3C83ENLyLtLWmhd9PIji5aJw R8ulcqPcdVGeuCYs1us8UC5HX8wEg267p/ZLpAufHrKVeZmX9mUpdL+ZMDxjannJQRtb KSig== 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=poeaczFnobDAJDpwpk5BcsU5kSMt1iPXosOnDbOt6Fo=; b=H6xy4nB7BWS+99+FS+2kI9Usq238fTCtgnxmhJFfs9/Idy0sa20mMFc3GJMmBZEiXP saZqowgbrUsozPKuMi+1MDwnA33Nf8T1oBmOjEHUm8H58yk6S/XxkiP9g9cRMjDUivR4 qeV0My66bK2uuUcXgv+AM5WRLavhfhMSEaW/FyDeoe6hCjzflqTN16ZjOGAZbb6IXUFZ I/wFb2fnhB9vlR4UXn07YKbRQVerE/l7YdrQkQG5I0jRlY37YStITkT61HxwXaxfnWgQ 0GbnYTwahgXhT46kS6vkTA0wZhYB7Ddg7gLPe34MIkhnS3HePka2MgApjCUoK0aeITju 0y9g== X-Gm-Message-State: AElRT7E5bAccNO+J31o0fjFZSl28r4yoONCF3ZHz+6qnuMxTEhPxuoHx /qitiS8s3NgjBf7PROlF2dWfreYx6GlAbtR+JKLZUw== X-Google-Smtp-Source: AG47ELuv6/QrwHpWzFfgoQUgtn6gwxsltW5J15dlhgnUVxs5AqZlQfbc3U1hl/QbZ/KKlWTifr18SJiHb9Q1Pnq7xw8= X-Received: by 10.28.190.18 with SMTP id o18mr1750381wmf.86.1520969569250; Tue, 13 Mar 2018 12:32:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.109.7 with HTTP; Tue, 13 Mar 2018 12:32:48 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Tue, 13 Mar 2018 15:32:48 -0400 Message-ID: Subject: Re: [pgadmin4][patch] Unit test fail on GreenPlum (#3190) To: Joao De Almeida Pereira Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="f403043c3bf0e3cc83056750523c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --f403043c3bf0e3cc83056750523c Content-Type: text/plain; charset="UTF-8" Thanks, applied. On Tue, Mar 13, 2018 at 2:19 PM, Joao De Almeida Pereira < jdealmeidapereira@pivotal.io> wrote: > Hi > > Attached you can find the patch that instead of using the json > configuration, connects to the database to retrieve the type and then check > if the test should be skipped or not. > > Thanks > Victoria & Joao > > On Sun, Mar 11, 2018 at 8:20 PM Dave Page wrote: > >> Hi >> >> On Sun, Mar 11, 2018 at 7:22 PM, Joao De Almeida Pereira < >> jdealmeidapereira@pivotal.io> wrote: >> >>> Hello, >>> Can you point out an example? >>> Thanks >>> >> >> See the setUp function in test_resource_groups_add.py: >> >> if "type" in server_con["data"]: >> if server_con["data"]["type"] == "pg": >> message = "Resource groups are not supported by PG." >> self.skipTest(message) >> else: >> if server_con["data"]["version"] < 90400: >> message = "Resource groups are not supported by PPAS >> 9.3" \ >> " and below." >> self.skipTest(message) >> >> >>> >>> >>> On Sat, Mar 10, 2018, 3:53 PM Dave Page wrote: >>> >>>> Hi >>>> >>>> On Friday, March 9, 2018, Joao De Almeida Pereira < >>>> jdealmeidapereira@pivotal.io> wrote: >>>> >>>>> Hello Hackers, >>>>> >>>>> Attached you can find the patch that skip some tests and correct >>>>> issues on SQL that are failing when trying to connect to a GreenPlum >>>>> database. >>>>> >>>>> We did this by adding a attribute to to test_json called "db_type" >>>>> that will carry the type of database we are running tests against. >>>>> >>>> >>>> Any reason we can't do that dynamically as we do with the EPAS-specific >>>> tests? >>>> >>>> >>>>> >>>>> When we run tests against a GreenPlum instance the configuration would >>>>> look like this: >>>>> >>>>> { >>>>> "name": "GreenPlum", >>>>> "comment": "GreenPlum DB", >>>>> "db_username": "gp", >>>>> "host": "localhost", >>>>> "db_password": "", >>>>> "db_port": 5433, >>>>> "maintenance_db": "postgres", >>>>> "sslmode": "prefer", >>>>> "tablespace_path": "", >>>>> "enabled": true, >>>>> "db_type": "gpdb" >>>>> } >>>>> >>>>> >>>>> >>>>> >>>>> Thanks >>>>> Joao >>>>> >>>> >>>> >>>> -- >>>> 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 --f403043c3bf0e3cc83056750523c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, applied.

On Tue, Mar 13, 2018 at 2:19 PM, Joao De Almeida Pere= ira <jdealmeidapereira@pivotal.io> wrote:
Hi

Attached = you can find the patch that instead of using the json configuration, connec= ts to the database to retrieve the type and then check if the test should b= e skipped or not.

Thanks
Victoria & = Joao

On Sun, Mar 11, 2018 at 8:20 PM Dave Page <dpage@pgadmin.org> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
Hi

On Sun, Mar 11, 2018 at 7:22 = PM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io&g= t; wrote:
Hello= ,
Can you point out an example?
Thanks

See the setUp function in test_resource_group= s_add.py:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 if &quo= t;type" in server_con["data"]:
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 if server_con["data"]["type"] = =3D=3D "pg":
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 message =3D "Resource groups are not supported by PG.&qu= ot;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self.= skipTest(message)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 else:=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if serve= r_con["data"]["version"] < 90400:
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 message =3D = "Resource groups are not supported by PPAS 9.3" \
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 " and below."
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self.skipTest(mess= age)
=C2=A0


= On Sat, Mar 10, 2018, 3:53 PM Dave Page <dpage@pgadmin.org> wrote:
Hi

On Friday, March 9, 2018= , Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
Hello Hackers,<= div>
Attached you can find the patch that skip some tests and= correct issues on SQL that are failing when trying to connect to a GreenPl= um database.

We did this by adding a attribute to = to test_json called "db_type" that will carry the type of databas= e we are running tests against.

Any reason we can't do that dynamically as we do with the EPAS-specifi= c tests?
=C2=A0

When we run tests against a Gree= nPlum instance the configuration would look like this:
{
"name":= "GreenPlum"<= span style=3D"color:rgb(204,120,50)">,
"comment&q= uot;: "GreenPlum DB",
<= span style=3D"color:rgb(152,118,170)">"db_username": "gp",
<= span style=3D"color:rgb(204,120,50)"> "host": "localhost",
"db_password&= quot;: "",
"db_port": 5433,
"mainten= ance_db": "postgres",
"sslmode": "prefer",
"tablespace_path": "",
"enabl= ed": true,
"db_type": "gpdb"
}



Thanks
Joao


--
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 Enterpr= ise PostgreSQL Company



--
Dave Page
Blog: = http://pgsnake.bl= ogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com<= br>The Enterprise PostgreSQL Company
--f403043c3bf0e3cc83056750523c--