public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dave Page <[email protected]>
To: Surinder Kumar <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin4][Patch][RM2257]: Query tool - Insert row doesn't use default values
Date: Fri, 12 May 2017 11:11:58 +0100
Message-ID: <CA+OCxow55atP-9DRqzSU_knpwcExjN90Fg1nmHb7ZSg87-VvGg@mail.gmail.com> (raw)
In-Reply-To: <CAM5-9D8V1-88msMU40ads-Ti6JHKg=S9AvNfNdVn_x_VHFrkVA@mail.gmail.com>
References: <CAM5-9D_SSL81uT4AqsRr8WPABWA6S-iE34OxLb8YqfVN3myeJg@mail.gmail.com>
<CA+OCxoySjV87N+YEkhXRzWaaGNCX4o+KuKnVGrYhLuWYeDx+SA@mail.gmail.com>
<CAM5-9D8MdAqvix74_K+eMkeGkP7r4Aost1Uqz4hupMRPxwqzAw@mail.gmail.com>
<CA+OCxoxkfbwJaWgCTTZ7eqrkv7Y49jU2EUmDsH_5raZqSFwZsA@mail.gmail.com>
<CAM5-9D_ZEysH0ewuCoOoon18mim_G9r-2es=+MbyYXnsLqrTEw@mail.gmail.com>
<CAM5-9D-kZEWrqgxr6-PyB_YVCdovJm8PpXGDpdfcpo65t_Sakg@mail.gmail.com>
<CA+OCxoyFLFK9nxbpTGJ=f2em1D_fmmFUaxh7LgUeNGWQr3fj6w@mail.gmail.com>
<CAM5-9D9Pm3bGgiv+fSjfr3Ouc-puMS3m6x4N+vGdELmWVJNcig@mail.gmail.com>
<CA+OCxozDsoz0NX+4ywBH4gvyHQ2=Lk0f9QT8q2Mj0v=5p+5B_A@mail.gmail.com>
<CAM5-9D-nWM3i-krc0KbOcAtDQNMefJs+xOFkgP0oaV84wPBbAw@mail.gmail.com>
<CA+OCxoyNm6zP-=ozL2eTaGpsVgggkp5stU2ZyKhdTzspkAc8sQ@mail.gmail.com>
<CAM5-9D_76iVD-C+80_7WL1y9skxo5ntmoQbKVOVaMb+0Xa90yg@mail.gmail.com>
<CA+OCxowq-52VR5hTgBTGa3zGi6NVkAmM2AoGDLW2_wm_QdL0hA@mail.gmail.com>
<CA+OCxox6_JojQkaujk4qE=egt5Zj6hYe0V33kLYTxQhPMH4H2Q@mail.gmail.com>
<CAM5-9D8TfBb5YXvEcyd+1=oarWVYOFnN-DVYNx_N3zNRKPGbdg@mail.gmail.com>
<CA+OCxoxGQfP-HXTfBF+hDLvkex1YDQA+Xovppt6ogT+H8juXGw@mail.gmail.com>
<CAM5-9D9JdEim47AnTVKKhqOBJsbxoO+ufwE7FtPya9HmC6j8Zg@mail.gmail.com>
<CAM5-9D8V1-88msMU40ads-Ti6JHKg=S9AvNfNdVn_x_VHFrkVA@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
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:==================================
====================================
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: "''" != 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=1)
On Wed, May 10, 2017 at 3:02 PM, Surinder Kumar <
[email protected]> 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 <
> [email protected]> 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 <[email protected]> wrote:
>>
>>>
>>>
>>> On Wed, May 10, 2017 at 9:39 AM, Surinder Kumar <
>>> [email protected]> wrote:
>>>
>>>> Hi Dave,
>>>>
>>>> On Wed, May 10, 2017 at 2:06 PM, Dave Page <[email protected]> wrote:
>>>>
>>>>> Any chance we can get this wrapped up today Surinder?
>>>>>
>>>> I 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? 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
view thread (25+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: [pgAdmin4][Patch][RM2257]: Query tool - Insert row doesn't use default values
In-Reply-To: <CA+OCxow55atP-9DRqzSU_knpwcExjN90Fg1nmHb7ZSg87-VvGg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox