Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d97YN-0004kn-Bh for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 May 2017 10:12:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d97YM-0006Ay-Ug for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 May 2017 10:12:06 +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 1d97YL-00069g-Ft for pgadmin-hackers@postgresql.org; Fri, 12 May 2017 10:12:05 +0000 Received: from mail-io0-x22e.google.com ([2607:f8b0:4001:c06::22e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d97YG-00048i-Ts for pgadmin-hackers@postgresql.org; Fri, 12 May 2017 10:12:04 +0000 Received: by mail-io0-x22e.google.com with SMTP id k91so37277306ioi.1 for ; Fri, 12 May 2017 03:12:00 -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=HC8it2N5BNJCAKzz49wpMGNREJSEcq82pKm4FupdNdE=; b=C+FVy5k7VTCkxUCgZar/9LeCv3Im2D5/QOqKlrJHeQ/SVaqd4vwLAfM4gCGFqZtiF/ RCquU7822TdRQf8Cuis4d2hwNEVY+r3aQ/yHtPxqRqleHgum3gL/k/4/KyLBhTfRCck4 vN0p/XhkqeA4qSmI/eYwFcBLIBhhQXDGsDOrbhZndXPOAZdeT8OTkhroXSsiobypIniS 9swfNjNUadYhSbFvVTOb0dLTxiFxcE+Hmx1iCYHTAdCEdetGvgE5p8+sGrJ03fCrQhBG DE2hm4kBrxQE1UtA1ZrZC0i3Xy9qO3KVr+p6ClVWeNtrm4BGa5PVm1T/ExD5nY2gt1Tv mVXw== 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=HC8it2N5BNJCAKzz49wpMGNREJSEcq82pKm4FupdNdE=; b=ksVVSyssiCC0XlMEUiDrU7FJxsbhDYl6gCJV3mpjjUFpX4hQldWPvIbfkLCsUn7QmG mM0l6sgxui40rwmgrlUTABKYdiY7Hdu8hURqqrHO5Ii0qOnTJ3wuLMwtLYuhPh0n5+gy PcOLoI/pASfC9CLTa4VtS1oOiMELVpFFwGYP8aVjEAc7kX8RnIxQa228kutrzUzBIhnI Xr3fp3NwdsBjqvGlrX8usc/LDpWNWwdFYsw5YrW9IJOoQodxQX/WgSinK3qDH3bK0Ob6 iTNVp4K6mFiNRhS1H9vIMmceBFjzYnLsHPMT4PfDpuPELaCkPOTD8dv8ba6mZP2dpqkL 8LQQ== X-Gm-Message-State: AODbwcDIR1CR8KCgmMU+98EpPTDIPBg74U+Um10IMcGy0hQEkCE+wwt4 FlYFPcdqdnqrGzu2lB6xOVJlVDmpew== X-Received: by 10.107.51.14 with SMTP id z14mr2793416ioz.84.1494583919068; Fri, 12 May 2017 03:11:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.174.167 with HTTP; Fri, 12 May 2017 03:11:58 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Fri, 12 May 2017 11:11:58 +0100 Message-ID: Subject: Re: [pgAdmin4][Patch][RM2257]: Query tool - Insert row doesn't use default values To: Surinder Kumar Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="001a113a8bc895624a054f50efaf" 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 --001a113a8bc895624a054f50efaf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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/refresh? We need to keep the feature tests as fast as possible to ensure they remain practical to run. - I get the following failure under Python 2. It passes under Python 3 as you might imagine given the assertion error. 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/ web/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/ 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: self._verify_update_data(table, row) 2017-05-12 11:00:00,861:ERROR:STDERR: File "/Users/dpage/git/pgadmin4/ web/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 update= . > > 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 test= 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 >>> >> >> > --=20 Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --001a113a8bc895624a054f50efaf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

Couple of comments:

- Can we improve the speed = of this test? Perhaps by adding multiple rows to the table at once, then ch= ecking the result after a single save/refresh? We need to keep the feature = tests as fast as possible to ensure they remain practical to run.

- I get the following failure under Python 2. It passes und= er Python 3 as you might imagine given the assertion error.

<= /div>
Thanks!

2017-05-12 11:00:00,860:ERROR:ST= DERR:=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.CheckForViewDataTes= t)
2017-05-12 11:00:00,861:ERROR:STDERR:Validate Insert, Upd= ate 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:STD= ERR:Traceback (most recent call last):
2017-05-12 11:00:00,8= 61:ERROR:STDERR: =C2=A0File "/Users/dpage/git/pgadmin4/web/pgadmi= n/feature_tests/view_data_dml_queries.py", line 160, in runTest
2017-05-12 11:00:00,861:ERROR:STDERR: =C2=A0 =C2=A0self._update_ro= w_in_table(key)
2017-05-12 11:00:00,861:ERROR:STDERR: =C2=A0= File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/vi= ew_data_dml_queries.py", line 432, in _update_row_in_table
2= 017-05-12 11:00:00,861:ERROR:STDERR: =C2=A0 =C2=A0self._verify_update_data(= table, row)
2017-05-12 11:00:00,861:ERROR:STDERR: =C2=A0File= "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view_d= ata_dml_queries.py", line 477, in _verify_update_data
2017-0= 5-12 11:00:00,861:ERROR:STDERR: =C2=A0 =C2=A0self.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:-----------------= -----------------------------------------------------
2= 017-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,8= 61:ERROR:STDERR: (failures=3D1)
On Wed, May= 10, 2017 at 3:02 PM, Surinder Kumar <surinder.kumar@enterpr= isedb.com> wrote:
Hi Dave,

P= lease find attached patch for Feature test cases for RM_2257

Implement= ation detail:

=C2=A0- Added a test_data.json file which contains Ins= ert and Update test related input data
=
=C2=A0- First of all, we create th= ree tables such as
=C2=A0 =C2=A0 =C2=A0= a) 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 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 update.<= /div>

Please review the patch.


<= div class=3D"gmail_quote">On Wed, May 10, 2017 at 2:22 PM, Surinder Kumar <= span dir=3D"ltr"><surinder.kumar@enterprisedb.com> wrote:
Hi Dave,

<= /div>
Please find attached patch for RM only.=

Changes:

=C2=A0- All formatters now=C2=A0handles both [null] and [default] values<= /div>

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

=C2=A0- added light grey col= or for cells with [null] and [default] placeholders.

On Wed, May 10, 2017 at 2:12 PM, Dave Page <dpage@pgadmin.org&g= t; wrote:


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

On Wed, May 10, 2017 at 2:06 PM, Dave Page <dpage@pgad= min.org> wrote:
Any chance we can get this wrapped up today Surind= er?
=E2=80=8BI have= fixed RM case, I am currently writing its feature test cases which is taki= ng some time.
Should I send patch for R= M case only?=E2=80=8B I will try to complete test cases by today eod.
=

Yes plea= se.

Thanks!

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

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





--
--001a113a8bc895624a054f50efaf--