Re: [pgadmin-hackers] [pgAdmin4][Patch][RM2257]: Query tool - Insertrow doesn't use default values

Поиск
Список
Период
Сортировка
От Surinder Kumar
Тема Re: [pgadmin-hackers] [pgAdmin4][Patch][RM2257]: Query tool - Insertrow doesn't use default values
Дата
Msg-id CAM5-9D8SWqCBmDwsjHojG1dPr34OyOODpF4uiL66qMZCyLxK7Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [pgadmin-hackers] [pgAdmin4][Patch][RM2257]: Query tool - Insertrow doesn't use default values  (Dave Page <dpage@pgadmin.org>)
Список pgadmin-hackers
Hi Dave,

On Fri, May 12, 2017 at 3:41 PM, Dave Page <dpage@pgadmin.org> 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/refresh? We need to keep the feature tests as fast as possible to ensure they remain practical to run.
​Sure. I will do this and send updated patch.​

- I get the following failure under Python 2. It passes under Python 3 as you might imagine given the assertion error.
​I will check.​

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 <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 <dpage@pgadmin.org> 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 <dpage@pgadmin.org> 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

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: [pgadmin-hackers] pgAdmin 4 commit: Minor colour tweaks for highlighted rows in thedata
Следующее
От: pgAdmin 4 Jenkins
Дата:
Сообщение: [pgadmin-hackers] Jenkins build is back to normal : pgadmin4-master-python34 #103