Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1grFxE-0006MY-4B for pgadmin-hackers@arkaria.postgresql.org; Wed, 06 Feb 2019 05:41:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1grFxB-0004Cc-Tl for pgadmin-hackers@arkaria.postgresql.org; Wed, 06 Feb 2019 05:40:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1grFxB-0004CV-GY for pgadmin-hackers@lists.postgresql.org; Wed, 06 Feb 2019 05:40:57 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1grFx8-0001FL-93 for pgadmin-hackers@postgresql.org; Wed, 06 Feb 2019 05:40:56 +0000 Received: by mail-qt1-x841.google.com with SMTP id 2so6660113qtb.5 for ; Tue, 05 Feb 2019 21:40:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=133DImVse9XlRyTTir5Ouu1kJs98lbldMmMwebkh0Ig=; b=vA+fbCUjrIwOP7CuFmMbauAlfTgEljE+Eb3U4SbePt7DEtPxHotp2pQt0oM+gdVrCA /Q5dceILZzBTNDqK0dsu8Yo/UnEVWXsimBARg5gXAvoZktCoArNITCLIP6ejY2mx3qYP lRD35myWnPefrYYs6+uP3vbRUykDt/qZQTN7NNY60k94f798BKYzE2gy3unj+aWsugJS dDGXjYzYNqcLYBTWEDZ1NGQWHLzOllHNeCAiF5bzgmjKv8+It1QOOEBcRCBC6JSt4atr cKYRh9IMq9dwFklmH023WACXZV5FqeTaiseSZknNbaRB20IhjsyxiyUsQvLdwDkcAz6Y KRng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=133DImVse9XlRyTTir5Ouu1kJs98lbldMmMwebkh0Ig=; b=Z2oaPyBiDQ1HMckU/UiSYZi1/9ahldM+7lOHR+6xHbcCppgnJH0dhgBQnD5bhDI46W ldTo9FGOdNyaR+NBWQJHCLlOJI1HSSZpby6rTRx5Zxs/CVDbFEzFrfBL/MgXV42cKcmT NOBizcdIRThZzB7/D1F+7o1zzmnISiCXNrCTKHKEJLGUXDgEXJDdfJBg+hrgXKRd1AMD L4c//hEOAnbjIxb3wDfw6P4HISdHjUKZyyLGC+dI8s6ENc/obF8iqgcVyB+Jpi7MaU2N HUme9DJVtLpB3hIO5qOB9Z6jcECSHWqZJKT8fK+Iu6Tdu2VNWTXrpVvidAWXjOvzyLkS tk6A== X-Gm-Message-State: AHQUAuaoD1E9X6STiN6kvj6axg/JIe+8Rp1ofCsZuNHnvFvMNVLvO3or 34RauthslPVPeiXKuDSJ+CIIvjkHVYW6efA7tAKMXA== X-Google-Smtp-Source: AHgI3IbKR5NlqUVgtbHjQoyQ6cmdh9f8i7XihgdVSd8YnTrInKaNvU79iI8Af3Ys3yQ10QX0yAU0FNaTBxibiZul3Is= X-Received: by 2002:ac8:60d6:: with SMTP id i22mr6323645qtm.323.1549431652752; Tue, 05 Feb 2019 21:40:52 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Akshay Joshi Date: Wed, 6 Feb 2019 11:10:41 +0530 Message-ID: Subject: Re: [pgAdmin4][RM3936] Feature tests failing intermittently for SQL editor related test cases To: Aditya Toshniwal Cc: Khushboo Vashi , pgadmin-hackers Content-Type: multipart/alternative; boundary="00000000000044347f0581332b29" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000044347f0581332b29 Content-Type: text/plain; charset="UTF-8" Hi Aditya Some improvement, 1 test case is still failing but not consistent. I have run the test cases 3 times out of which one time all runs successfully. On Tue, Feb 5, 2019 at 5:28 PM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi Hackers, > > Attached is the updated patch to fix possible causes of failure. > Kindly review (fingers crossed) > > > On Tue, Feb 5, 2019 at 10:48 AM Khushboo Vashi < > khushboo.vashi@enterprisedb.com> wrote: > >> >> >> On Tue, Feb 5, 2019 at 10:40 AM Akshay Joshi < >> akshay.joshi@enterprisedb.com> wrote: >> >>> Hi Aditya >>> >>> On Mon, Feb 4, 2019 at 2:18 PM Aditya Toshniwal < >>> aditya.toshniwal@enterprisedb.com> wrote: >>> >>>> Hi Akshay, >>>> >>>> I tried to simulate, but no luck. It works on my system :( >>>> >>> >>> I have tried and Feature test are failing randomly for each run. I >>> have verified it on OSX and Ubuntu both. >>> >>>> >>>> +1 >> >>> On Wed, Jan 30, 2019 at 7:15 PM Akshay Joshi < >>>> akshay.joshi@enterprisedb.com> wrote: >>>> >>>>> Hi Aditya >>>>> >>>>> I have applied your patch but following test cases are failing >>>>> consistently: >>>>> >>>>> - CopySelectedQueryResultsFeatureTest >>>>> - QueryToolAutoCompleteFeatureTest >>>>> >>>>> I have verified your patch on Mac OSX and Ubuntu. Chrome Version >>>>> 71.0.3578.98 >>>>> >>>>> On Tue, Jan 29, 2019 at 7:38 PM Akshay Joshi < >>>>> akshay.joshi@enterprisedb.com> wrote: >>>>> >>>>>> >>>>>> >>>>>> On Tue, 29 Jan 2019, 19:09 Dave Page >>>>> >>>>>>> Akshay, can you look at this please? >>>>>>> >>>>>> >>>>>> Sure. >>>>>> >>>>>>> >>>>>>> On Tue, Jan 29, 2019 at 1:36 PM Aditya Toshniwal >>>>>>> wrote: >>>>>>> > >>>>>>> > Hi Hackers, >>>>>>> > >>>>>>> > Attached is the updated patch. I have changed >>>>>>> fill_input_by_field_name function to use javascript to set values of text >>>>>>> boxes and the selector is changed from xpath to CSS with a :not(:disabled) >>>>>>> clause. With this, test case will fail if tried to set the value of a >>>>>>> disabled input. >>>>>>> > >>>>>>> > Kindly review. >>>>>>> > >>>>>>> > >>>>>>> > On Mon, Jan 28, 2019 at 5:44 PM Aditya Toshniwal < >>>>>>> aditya.toshniwal@enterprisedb.com> wrote: >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> On Mon, Jan 28, 2019 at 5:39 PM Dave Page >>>>>>> wrote: >>>>>>> >>> >>>>>>> >>> On Mon, Jan 28, 2019 at 12:05 PM Aditya Toshniwal >>>>>>> >>> wrote: >>>>>>> >>> > >>>>>>> >>> > Hi Dave, >>>>>>> >>> > >>>>>>> >>> > On Mon, Jan 28, 2019 at 5:01 PM Dave Page >>>>>>> wrote: >>>>>>> >>> >> >>>>>>> >>> >> Hi >>>>>>> >>> >> >>>>>>> >>> >> On Mon, Jan 28, 2019 at 7:00 AM Aditya Toshniwal >>>>>>> >>> >> wrote: >>>>>>> >>> >> > >>>>>>> >>> >> > Hi Hackers, >>>>>>> >>> >> > >>>>>>> >>> >> > Attached is the patch to fix failing SQL editor related >>>>>>> feature tests. >>>>>>> >>> >> > The failure is occurring mostly because of send_keys >>>>>>> function of selenium which sometimes does not input the complete text. The >>>>>>> change will use Codemirror javascript object to set the text. >>>>>>> >>> >> > >>>>>>> >>> >> > I have also added new args flag "--modules" which can be >>>>>>> used after --pkg where you can test a specific module file under the pkg. >>>>>>> This is not so useful for build but definitely helpful for the developers. >>>>>>> >>> >> >>>>>>> >>> >> One of the most common failures I see is failure to fill in >>>>>>> the >>>>>>> >>> >> details on the Add Server dialogue (it might type half of an >>>>>>> entry, >>>>>>> >>> >> then just hang). Should we get rid of all uses of send_keys? >>>>>>> >>> > >>>>>>> >>> > Setting the text using javascript executor can be done. >>>>>>> send_keys simulate an actual person, so if you try to set a disabled text >>>>>>> box using send_keys, it won't. Places where disabled fields doesn't matter, >>>>>>> send_keys can be removed. >>>>>>> >>> >>>>>>> >>> Can't we just do something like: >>>>>>> >>> >>>>>>> >>> if input.disabled == false: >>>>>>> >>> input.value = 'Foo'; >>>>>>> >>> else: >>>>>>> >>> raise exception .... >>>>>>> >> >>>>>>> >> I'll check if this can be done. Will get back. >>>>>>> >>> >>>>>>> >>> >>>>>>> >>> -- >>>>>>> >>> Dave Page >>>>>>> >>> Blog: http://pgsnake.blogspot.com >>>>>>> >>> Twitter: @pgsnake >>>>>>> >>> >>>>>>> >>> EnterpriseDB UK: http://www.enterprisedb.com >>>>>>> >>> The Enterprise PostgreSQL Company >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> -- >>>>>>> >> Thanks and Regards, >>>>>>> >> Aditya Toshniwal >>>>>>> >> Software Engineer | EnterpriseDB Software Solutions | Pune >>>>>>> >> "Don't Complain about Heat, Plant a tree" >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > -- >>>>>>> > Thanks and Regards, >>>>>>> > Aditya Toshniwal >>>>>>> > Software Engineer | EnterpriseDB Software Solutions | Pune >>>>>>> > "Don't Complain about Heat, Plant a tree" >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> 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* >>>>> >>>> >>>> >>>> -- >>>> Thanks and Regards, >>>> Aditya Toshniwal >>>> Software Engineer | EnterpriseDB Software Solutions | Pune >>>> "Don't Complain about Heat, Plant a tree" >>>> >>> >>> >>> -- >>> *Akshay Joshi* >>> >>> *Sr. Software Architect * >>> >>> >>> >>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* >>> >> > > -- > Thanks and Regards, > Aditya Toshniwal > Software Engineer | EnterpriseDB Software Solutions | Pune > "Don't Complain about Heat, Plant a tree" > -- *Akshay Joshi* *Sr. Software Architect * *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* --00000000000044347f0581332b29 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Aditya

Some improvement, 1 test= case is still failing but not consistent. I have run the test cases 3 time= s out of which one time all runs successfully.

On Tue, Feb 5, 2019 at = 5:28 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,

<= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">Attach= ed is the updated patch to fix possible causes of failure.=C2=A0
Kindly rev= iew (fingers crossed)


On Tue, Feb 5, 2019 at 10:48 AM Khushboo Va= shi <khushboo.vashi@enterprisedb.com> wrote:


On T= ue, Feb 5, 2019 at 10:40 AM Akshay Joshi <akshay.joshi@enterprisedb.com> = wrote:
Hi=C2=A0Aditya

On Mon, Feb 4, 2019 at 2:18 PM Adit= ya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Akshay,

I tried to simulate, but no luck. It works on my system :(
<= /blockquote>

=C2=A0 =C2=A0I have tried and Feature test = are failing randomly for each run. I have verified it on OSX and Ubuntu bot= h.=C2=A0=C2=A0

<= /blockquote>
+1=C2=A0
On Wed, Jan 30, 2019 at 7:15 PM A= kshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi=C2=A0Aditya

I have applied your patch bu= t following test cases are failing consistently:
  • CopySele= ctedQueryResultsFeatureTest
  • QueryToolAutoCompleteFeatureTest
I have verified your patch on Mac OSX and Ubuntu. Chrome=C2=A0Version 71.0.3578.98

On Tue, Jan 29, 201= 9 at 7:38 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
<= br>
On Tue, 29 Jan 2019, 19:= 09 Dave Page <dpa= ge@pgadmin.org wrote:
Akshay, can you look at this please?

=C2=A0 =C2=A0 Sure.

On Tue, Jan 29, 2019 at 1:36 PM Aditya Toshniwal
<aditya.toshniwal@enterprisedb.com> wrote:
>
> Hi Hackers,
>
> Attached is the updated patch. I have changed fill_input_by_field_name= function to use javascript to set values of text boxes and the selector is= changed from xpath to CSS with a :not(:disabled) clause. With this, test c= ase will fail if tried to set the value of a disabled input.
>
> Kindly review.
>
>
> On Mon, Jan 28, 2019 at 5:44 PM Aditya Toshniwal <ad= itya.toshniwal@enterprisedb.com> wrote:
>>
>>
>>
>> On Mon, Jan 28, 2019 at 5:39 PM Dave Page <dpage@pgadmin.org= > wrote:
>>>
>>> On Mon, Jan 28, 2019 at 12:05 PM Aditya Toshniwal
>>> <aditya.toshniwal@enterprisedb.com>= wrote:
>>> >
>>> > Hi Dave,
>>> >
>>> > On Mon, Jan 28, 2019 at 5:01 PM Dave Page <dpage@pgadmi= n.org> wrote:
>>> >>
>>> >> Hi
>>> >>
>>> >> On Mon, Jan 28, 2019 at 7:00 AM Aditya Toshniwal
>>> >> <aditya.toshniwal@enterprisedb.com<= /a>> wrote:
>>> >> >
>>> >> > Hi Hackers,
>>> >> >
>>> >> > Attached is the patch to fix failing SQL editor = related feature tests.
>>> >> > The failure is occurring mostly because of send_= keys function of selenium which sometimes does not input the complete text.= The change will use Codemirror javascript object to set the text.
>>> >> >
>>> >> > I have also added new args flag "--modules&= quot; which can be used after --pkg where you can test a specific module fi= le under the pkg. This is not so useful for build but definitely helpful fo= r the developers.
>>> >>
>>> >> One of the most common failures I see is failure to f= ill in the
>>> >> details on the Add Server dialogue (it might type hal= f of an entry,
>>> >> then just hang). Should we get rid of all uses of sen= d_keys?
>>> >
>>> > Setting the text using javascript executor can be done. s= end_keys simulate an actual person,=C2=A0 so if you try to set a disabled t= ext box using send_keys, it won't. Places where disabled fields doesn&#= 39;t matter, send_keys can be removed.
>>>
>>> Can't we just do something like:
>>>
>>> if input.disabled =3D=3D false:
>>>=C2=A0 =C2=A0input.value =3D 'Foo';
>>> else:
>>>=C2=A0 =C2=A0raise exception ....
>>
>> I'll check if this can be done. Will get back.
>>>
>>>
>>> --
>>> Dave Page
>>> Blog:
http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>
>>
>>
>> --
>> Thanks and Regards,
>> Aditya Toshniwal
>> Software Engineer | EnterpriseDB Software Solutions | Pune
>> "Don't Complain about Heat, Plant a tree"
>
>
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"



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

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


--
Akshay Joshi
Sr. Software Archi= tect

<= b>

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


--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB Software= Solutions |=C2=A0Pune
"Don't Complain about Heat, Plant = a tree"


--
Akshay Joshi=
Sr. Software Architect


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


--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB Software Sol= utions |=C2=A0Pune
"Don't Complain about Heat, Plant a tr= ee"


--
Akshay Joshi
Sr. S= oftware Architect
=

Phone: +91 20-3058-9517
Mobile: +91 976-788-8246
=
--00000000000044347f0581332b29--