Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d97zp-0006Dg-Ry for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 May 2017 10:40:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d97zo-0007FO-Rk for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 May 2017 10:40:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d97zo-0007FE-6P for pgadmin-hackers@postgresql.org; Fri, 12 May 2017 10:40:28 +0000 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d97zj-0004kt-1r for pgadmin-hackers@postgresql.org; Fri, 12 May 2017 10:40:27 +0000 Received: by mail-wm0-x22b.google.com with SMTP id 142so67436603wma.1 for ; Fri, 12 May 2017 03:40:21 -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=HSMwmrSn20Xxrf7Zj0v6YVz9Tus7cHm+cTEYbd/BDcU=; b=JRUjcImmzC3ITlAAH09+Ywv8DLhrl/BPY+/x4W+BCODFXOVD+XdEMPB5ulwRBfMFd0 cri/AMp4RwyCYj7K3Kk5x7QDVAXOfQQEAIjdMdqjtcwoXqv41jefArMHbiWRF4QK0DAa lrkTF9FTUrfrSFH9ArprBWFz48Im+1WkLSBzBmU11XwO+i1xyzY1AlI4xA1a15drS1rK VWEz1Jw3nQYh2T+j3O8vwCDc7Yk48HZ+rHX/sQhhZ8YdIvyohJiACrtVotVLjrVRX0J3 E93C6567yTClMyFO82xFtQ4JwdQNlYymMWeVbmDe795YRJ+BtNDpnOONNeJVrGz4tITm Cy2g== 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=HSMwmrSn20Xxrf7Zj0v6YVz9Tus7cHm+cTEYbd/BDcU=; b=EtJoTACt8MX3J/vfJ5Z3FRe9gFdO8JDJGKqf/hY6JL9qg7orIkphOV7UUojeHfrMZg TRXneSmMmRDQudu6zyYZ8nbzfiE9ShDGi1os9W66QmXmxOyYJs+915u+66uYQje/A/AJ 15LQ7bVZgxXkiOqNrGVoZQq/8iEVcoVuFealJ9MAkB7C3tmq1UgKUpNFOD4ML8gnAGh+ d6rIfK1EAMWuLBHrloAVC3meI9uznltYOje4SxdaYMFHUUTQ47mSvZxiksW7BbaJfXk1 Hkvw7p2ftU1mBSDqtms/b6Wb//hf89c7ZJlbv6qYxqDshFzVAYFcdKi9nTQTuOYr8OPB T3Pw== X-Gm-Message-State: AODbwcC0BCE/mqt2lse4BYCUgFbrxGjMzt6/15m2UBYC8p5iaDDdxK9i 7z8d+Sq3GVpS8zdN9RUX8BCHkoJIH5xU X-Received: by 10.28.229.145 with SMTP id c139mr2507850wmh.107.1494585620365; Fri, 12 May 2017 03:40:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.19.138 with HTTP; Fri, 12 May 2017 03:39:49 -0700 (PDT) In-Reply-To: References: From: Surinder Kumar Date: Fri, 12 May 2017 16:09:49 +0530 Message-ID: Subject: Re: [pgAdmin4][Patch][RM2257]: Query tool - Insert row doesn't use default values To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="001a114712e2fd54c6054f515403" X-Pg-Spam-Score: -2.6 (--) 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 --001a114712e2fd54c6054f515403 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Dave, On Fri, May 12, 2017 at 3:41 PM, Dave Page wrote: > Hi, > > Couple of comments: > > - Can we improve the speed of this test? Perhaps by adding multiple rows > to the table at once, then checking the result after a single save/refres= h? > We need to keep the feature tests as fast as possible to ensure they rema= in > practical to run. > =E2=80=8BSure. I will do this and send updated patch.=E2=80=8B > > - I get the following failure under Python 2. It passes under Python 3 as > you might imagine given the assertion error. > =E2=80=8BI will check.=E2=80=8B > > Thanks! > > 2017-05-12 11:00:00,860:ERROR:STDERR:=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 2017-05-12 11:00:00,861:ERROR:STDERR:FAIL: runTest > (pgadmin.feature_tests.view_data_dml_queries.CheckForViewDataTest) > 2017-05-12 11:00:00,861:ERROR:STDERR:Validate Insert, Update operations > in View data with given test data > 2017-05-12 11:00:00,861:ERROR:STDERR:---------------------------------- > ------------------------------------ > 2017-05-12 11:00:00,861:ERROR:STDERR:Traceback (most recent call last): > 2017-05-12 11:00:00,861:ERROR:STDERR: File "/Users/dpage/git/pgadmin4/we= b > /pgadmin/feature_tests/view_data_dml_queries.py", line 160, in runTest > 2017-05-12 11:00:00,861:ERROR:STDERR: self._update_row_in_table(key) > 2017-05-12 11:00:00,861:ERROR:STDERR: File "/Users/dpage/git/pgadmin4/we= b > /pgadmin/feature_tests/view_data_dml_queries.py", line 432, in > _update_row_in_table > 2017-05-12 11:00:00,861:ERROR:STDERR: self._verify_update_data(table, > row) > 2017-05-12 11:00:00,861:ERROR:STDERR: File "/Users/dpage/git/pgadmin4/we= b > /pgadmin/feature_tests/view_data_dml_queries.py", line 477, in > _verify_update_data > 2017-05-12 11:00:00,861:ERROR:STDERR: self.assertEquals(cell2, > test_verify_data['data_default_nulls']) > 2017-05-12 11:00:00,861:ERROR:STDERR:AssertionError: "''" !=3D u'' > 2017-05-12 11:00:00,861:ERROR:STDERR:---------------------------------- > ------------------------------------ > 2017-05-12 11:00:00,861:ERROR:STDERR:Ran 6 tests in 208.850s > 2017-05-12 11:00:00,861:ERROR:STDERR:FAILED > 2017-05-12 11:00:00,861:ERROR:STDERR: (failures=3D1) > On Wed, May 10, 2017 at 3:02 PM, Surinder Kumar < > surinder.kumar@enterprisedb.com> wrote: > >> Hi Dave, >> >> Please find attached patch for Feature test cases for RM_2257 >> >> *Implementation detail:* >> >> - Added a test_data.json file which contains Insert and Update test >> related input data >> >> - First of all, we create three tables such as >> a) defaults_text >> b) defaults_boolean >> c) defaults_number >> d) defaults_json >> These tables has columns with different constraints (default value, >> not_null etc) to test with various input test data. >> >> - Test cases for insert are executed first and then test cases for updat= e. >> >> Please review the patch. >> >> >> On Wed, May 10, 2017 at 2:22 PM, Surinder Kumar < >> surinder.kumar@enterprisedb.com> wrote: >> >>> Hi Dave, >>> >>> Please find attached patch for RM only. >>> >>> *Changes:* >>> >>> - All formatters now handles both [null] and [default] values >>> >>> - the cell values are validated on server side as in pgAdmin3. >>> >>> - added light grey color for cells with [null] and [default] >>> placeholders. >>> >>> On Wed, May 10, 2017 at 2:12 PM, Dave Page wrote: >>> >>>> >>>> >>>> On Wed, May 10, 2017 at 9:39 AM, Surinder Kumar < >>>> surinder.kumar@enterprisedb.com> wrote: >>>> >>>>> Hi Dave, >>>>> >>>>> On Wed, May 10, 2017 at 2:06 PM, Dave Page wrote: >>>>> >>>>>> Any chance we can get this wrapped up today Surinder? >>>>>> >>>>> =E2=80=8BI have fixed RM case, I am currently writing its feature tes= t cases >>>>> which is taking some time. >>>>> Should I send patch for RM case only?=E2=80=8B I will try to complete= test >>>>> cases by today eod. >>>>> >>>> >>>> Yes please. >>>> >>>> Thanks! >>>> >>>> -- >>>> 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 > --001a114712e2fd54c6054f515403 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi = Dave,

On Fri= , May 12, 2017 at 3:41 PM, Dave Page <dpage@pgadmin.org> wro= te:
Hi,

Couple of comments:

=
- Can we improve the speed of this test? Perhaps by adding multi= ple rows to the table at once, then checking the result after a single save= /refresh? We need to keep the feature tests as fast as possible to ensure t= hey remain practical to run.
=E2=80=8BSure. I will do this and se= nd updated patch.=E2=80=8B

- I get the following f= ailure under Python 2. It passes under Python 3 as you might imagine given = the assertion error.
=E2=80=8BI will check.=E2=80=8B
Thanks!

2017-05-12 11:00:00,860:ERROR= :STDERR:=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D
2017-05-12 11:00:00,861:ERROR:STDERR:FAIL: runT= est (pgadmin.feature_tests.view_data_dml_queries.CheckForViewData= Test)
2017-05-12 11:00:00,861:ERROR:STDERR:Validate Insert, = Update operations in View data with given test data
2017-05-12 11= :00:00,861:ERROR:STDERR:-----------------------------------------= -----------------------------
2017-05-12 11:00:00,861:ERROR:= STDERR:Traceback (most recent call last):
2017-05-12 11:00:0= 0,861:ERROR:STDERR: =C2=A0File "/Users/dpage/git/pgadmin4/web/pga= dmin/feature_tests/view_data_dml_queries.py", line 160, in runTes= t
2017-05-12 11:00:00,861:ERROR:STDERR: =C2=A0 =C2=A0self._update= _row_in_table(key)
2017-05-12 11:00:00,861:ERROR:STDERR: =C2= =A0File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view= _data_dml_queries.py", line 432, in _update_row_in_table
2017-05-12 11:00:00,861:ERROR:STDERR: =C2=A0 =C2=A0self._verify_update_da= ta(table, row)
2017-05-12 11:00:00,861:ERROR:STDERR: =C2=A0F= ile "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view_data_dml_queries.py", line 477, in _verify_update_data
201= 7-05-12 11:00:00,861:ERROR:STDERR: =C2=A0 =C2=A0self.assertEquals(cell2, te= st_verify_data['data_default_nulls'])
2017-05-12 11:= 00:00,861:ERROR:STDERR:AssertionError: "''" !=3D u&#= 39;'
2017-05-12 11:00:00,861:ERROR:STDERR:--------------= --------------------------------------------------------
2017-05-12 11:00:00,861:ERROR:STDERR:Ran 6 tests in 208.850s
20= 17-05-12 11:00:00,861:ERROR:STDERR:FAILED
2017-05-12 11:00:0= 0,861:ERROR:STDERR: (failures=3D1)
On Wed, May 10, 2017 at 3:02 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:
Hi Dave,

Please find attached patch for Feature test cas= es for RM_2257

Implementation detail:

=C2=A0- Added a test_data.= json file which contains Insert and Update test related input data

=C2=A0= - First of all, we create three tables such as
=C2=A0 =C2=A0 =C2=A0a) defaults_text =C2=A0 =C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 =C2=A0b) defaults_boolean
=C2=A0 =C2=A0 =C2=A0c) defaults_number
=C2=A0 =C2=A0 =C2=A0d) defaults_json
=C2=A0 =C2=A0 =C2=A0These tables has column= s with different constraints (default value, not_null etc) to test with var= ious input test data.

- Test cases for insert are executed first and = then test cases for update.

<= div style=3D"font-size:small">Please review the patch.


= On Wed, May 10, 2017 at 2:22 PM, Surinder Kumar <surinder.ku= mar@enterprisedb.com> wrote:
H= i Dave,

Please find attached patch for RM only.

Changes:<= /div>

=C2=A0- All formatters n= ow=C2=A0handles both [null] and [default] values

=C2=A0- the cell values are validated on server si= de as in pgAdmin3.

=C2=A0- added light grey color for cells with [null] a= nd [default] placeholders.

On Wed, May 10, 2017 at 2:12 PM, Dave Page <dpage@p= gadmin.org> wrote:


On Wed, May 10, 2017 at 9:39 AM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:
<= /span>
Hi Dave,

<= span>
On Wed, May 10, 2017 at 2:06 PM, Dave= Page <dpage@pgadmin.org> wrote:
Any chance we can get this wrapp= ed up today Surinder?
=E2=80=8BI have fixed RM case, I am currently writing its feature test c= ases which is taking some time.
Should = I send patch for RM case only?=E2=80=8B I will try to complete test cases b= y today eod.

Yes please.

Thanks!

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

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





--
Dave PageBlog: http://pg= snake.blogspot.com
Twitter: @pgsnake

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

--001a114712e2fd54c6054f515403--