Re: pgAdmin IV : Unittest modular patch(database child nodes) and trigger function

From: Priyanka Shendge <priyanka(dot)shendge(at)enterprisedb(dot)com>
To: Dave Page <dave(dot)page(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Kanchan Mohitey <kanchan(dot)mohitey(at)enterprisedb(dot)com>
Subject: Re: pgAdmin IV : Unittest modular patch(database child nodes) and trigger function
Date: 2016-08-19 09:59:37
Message-ID: CAKmZXFTVqmCzzxnA2caeRzZGSrHDoXTct0W8CK3u0t-m_r199Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On 19 August 2016 at 15:17, Dave Page <dave(dot)page(at)enterprisedb(dot)com> wrote:

> I also have been left with 159(!) databases across my three test
> servers as a result of these failures.
>
> Please ensure that cleanup is fixed as a matter of priority - we
> should always remove test databases.
>

Yes, in tearDownClass() cleanup process is been taken care, as its failing
in
tearDownClass() it failed to cleanup or remove databases/other dependant
nodes created.

>
> Sidenote: Why are we creating so many? It would be *far* more
> efficient to create just one for each test run wouldn't it?
>

Correct. As of now its creating and deleting dependant node/object for each
test case.
Navnath will work on it to enhance the current behaviour.

>
> On Fri, Aug 19, 2016 at 10:39 AM, Dave Page <dave(dot)page(at)enterprisedb(dot)com>
> wrote:
> > Hi
> >
> > I'm seeing a lot of failures with these tests. It looks like an
> > ordering issue, as (from what I can see) they're all failures to drop
> > objects due to dependencies.
> >
> > I've attached the log.
> >
> > On Thu, Aug 18, 2016 at 9:54 AM, Priyanka Shendge
> > <priyanka(dot)shendge(at)enterprisedb(dot)com> wrote:
> >> Hi Dave,
> >>
> >> Please find attached patch for database child nodes and trigger function
> >> node.
> >> There are few changes made in trigger function test cases w.r.t. event
> >> trigger which added in patch attached.
> >>
> >> You can run testcases using following commands:
> >>
> >> For all nodes
> >> python regression/runtests.py
> >>
> >> For casts:
> >> python regression/runtests.py --pkg
> >> browser.server_groups.servers.databases.casts
> >>
> >> For Event Triggers:
> >> python regression/runtests.py --pkg
> >> browser.server_groups.servers.databases.event_triggers
> >>
> >> For Extensions:
> >> python regression/runtests.py --pkg
> >> browser.server_groups.servers.databases.extensions
> >>
> >> For Foreign data wrappers
> >> python runtests.py --pkg
> >> browser.server_groups.servers.databases.foreign_data_wrappers
> >>
> >> For foreign servers:
> >> python runtests.py --pkg
> >> browser.server_groups.servers.databases.foreign_data_
> wrappers.foreign_servers
> >>
> >> For user mapping:
> >> python runtests.py --pkg
> >> browser.server_groups.servers.databases.foreign_data_
> wrappers.foreign_servers_user_mapping
> >>
> >> Let me know for any modifications.
> >>
> >>
> >>
> >>
> >>
> >> On 16 August 2016 at 18:08, Navnath Gadakh <
> navnath(dot)gadakh(at)enterprisedb(dot)com>
> >> wrote:
> >>>
> >>> Hi Dave,
> >>> Currently I am working on that. Will send it in the next patch.
> >>>
> >>> Thanks!
> >>>
> >>>
> >>> On Tue, Aug 16, 2016 at 6:05 PM, Dave Page <dave(dot)page(at)enterprisedb(dot)com
> >
> >>> wrote:
> >>>>
> >>>> Thanks - applied!
> >>>>
> >>>> Can you please work on the following ASAP?
> >>>>
> >>>> - Removal of encoded credentials from the SMTP test output.
> >>>> - Summary display as discussed.
> >>>>
> >>>> Thanks again.
> >>>>
> >>>> On Fri, Aug 12, 2016 at 10:40 AM, Navnath Gadakh
> >>>> <navnath(dot)gadakh(at)enterprisedb(dot)com> wrote:
> >>>> > Hi Dave,
> >>>> > Please find the patch for API unit test cases for Schema and
> its
> >>>> > sub-nodes (Collations and Trigger functions).
> >>>> > You can run testsuite using the following commands
> >>>> > For schemas
> >>>> > python regression/runtests.py --pkg
> >>>> > browser.server_groups.servers.databases.schemas
> >>>> > For Collations
> >>>> > python regression/runtests.py --pkg
> >>>> > browser.server_groups.servers.databases.schemas.collations
> >>>> > For Trigger functions
> >>>> > python regression/runtests.py --pkg
> >>>> > browser.server_groups.servers.databases.schemas.functions
> >>>> > For all nodes
> >>>> > python regression/runtests.py
> >>>> >
> >>>> > Thanks!
> >>>> >
> >>>> >
> >>>> >
> >>>> > On Tue, Aug 9, 2016 at 8:36 PM, Dave Page <
> dave(dot)page(at)enterprisedb(dot)com>
> >>>> > wrote:
> >>>> >>
> >>>> >> Thanks - applied with some minor wording and README tweaks.
> >>>> >>
> >>>> >> On Tue, Aug 9, 2016 at 10:19 AM, Navnath Gadakh
> >>>> >> <navnath(dot)gadakh(at)enterprisedb(dot)com> wrote:
> >>>> >> > Hi Dave,
> >>>> >> >
> >>>> >> > On Mon, Aug 8, 2016 at 9:15 PM, Dave Page
> >>>> >> > <dave(dot)page(at)enterprisedb(dot)com>
> >>>> >> > wrote:
> >>>> >> >>
> >>>> >> >> Hi
> >>>> >> >>
> >>>> >> >> I guess you need to test if tablespace_path is omitted, not just
> >>>> >> >> empty?
> >>>> >> >
> >>>> >> > Yes, thats right.. Please find the updated patch.
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> This function test the add tablespace scenario (Check Tablespace
> >>>> >> >> Node)
> >>>> >> >> ...
> >>>> >> >> ERROR
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> ============================================================
> ==========
> >>>> >> >> ERROR: setUpClass
> >>>> >> >>
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> (pgadmin.browser.server_groups.servers.tablespaces.
> tests.test_tbspc_put.TableSpaceUpdateTestCase)
> >>>> >> >>
> >>>> >> >> ------------------------------------------------------------
> ----------
> >>>> >> >> Traceback (most recent call last):
> >>>> >> >> File
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_
> groups/servers/tablespaces/tests/test_tbspc_put.py",
> >>>> >> >> line 48, in setUpClass
> >>>> >> >> cls.server_group, cls.server_ids)
> >>>> >> >> File
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_
> groups/servers/tablespaces/tests/utils.py",
> >>>> >> >> line 122, in add_table_space
> >>>> >> >> data = get_tablespace_data(server_connect)
> >>>> >> >> File
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_
> groups/servers/tablespaces/tests/utils.py",
> >>>> >> >> line 41, in get_tablespace_data
> >>>> >> >> config_test_data['spc_location'] =
> >>>> >> >> server_config['tablespace_path']
> >>>> >> >> KeyError: 'tablespace_path'
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> ============================================================
> ==========
> >>>> >> >> ERROR: setUpClass
> >>>> >> >>
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> (pgadmin.browser.server_groups.servers.tablespaces.
> tests.test_tbspc_delete.TableSpaceDeleteTestCase)
> >>>> >> >>
> >>>> >> >> ------------------------------------------------------------
> ----------
> >>>> >> >> Traceback (most recent call last):
> >>>> >> >> File
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_
> groups/servers/tablespaces/tests/test_tbspc_delete.py",
> >>>> >> >> line 46, in setUpClass
> >>>> >> >> cls.server_group, cls.server_ids)
> >>>> >> >> File
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_
> groups/servers/tablespaces/tests/utils.py",
> >>>> >> >> line 122, in add_table_space
> >>>> >> >> data = get_tablespace_data(server_connect)
> >>>> >> >> File
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_
> groups/servers/tablespaces/tests/utils.py",
> >>>> >> >> line 41, in get_tablespace_data
> >>>> >> >> config_test_data['spc_location'] =
> >>>> >> >> server_config['tablespace_path']
> >>>> >> >> KeyError: 'tablespace_path'
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> ============================================================
> ==========
> >>>> >> >> ERROR: setUpClass
> >>>> >> >>
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> (pgadmin.browser.server_groups.servers.tablespaces.
> tests.test_tbspc_get.TablespaceGetTestCase)
> >>>> >> >>
> >>>> >> >> ------------------------------------------------------------
> ----------
> >>>> >> >> Traceback (most recent call last):
> >>>> >> >> File
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_
> groups/servers/tablespaces/tests/test_tbspc_get.py",
> >>>> >> >> line 45, in setUpClass
> >>>> >> >> cls.server_group, cls.server_ids)
> >>>> >> >> File
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_
> groups/servers/tablespaces/tests/utils.py",
> >>>> >> >> line 122, in add_table_space
> >>>> >> >> data = get_tablespace_data(server_connect)
> >>>> >> >> File
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_
> groups/servers/tablespaces/tests/utils.py",
> >>>> >> >> line 41, in get_tablespace_data
> >>>> >> >> config_test_data['spc_location'] =
> >>>> >> >> server_config['tablespace_path']
> >>>> >> >> KeyError: 'tablespace_path'
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> ============================================================
> ==========
> >>>> >> >> ERROR: runTest
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> (pgadmin.browser.server_groups.servers.tablespaces.
> tests.test_tbspc_add.TableSpaceAddTestCase)
> >>>> >> >> This function test the add tablespace scenario (Check Tablespace
> >>>> >> >> Node)
> >>>> >> >>
> >>>> >> >> ------------------------------------------------------------
> ----------
> >>>> >> >> Traceback (most recent call last):
> >>>> >> >> File
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_
> groups/servers/tablespaces/tests/test_tbspc_add.py",
> >>>> >> >> line 47, in runTest
> >>>> >> >> self.server_ids)
> >>>> >> >> File
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_
> groups/servers/tablespaces/tests/utils.py",
> >>>> >> >> line 122, in add_table_space
> >>>> >> >> data = get_tablespace_data(server_connect)
> >>>> >> >> File
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_
> groups/servers/tablespaces/tests/utils.py",
> >>>> >> >> line 41, in get_tablespace_data
> >>>> >> >> config_test_data['spc_location'] =
> >>>> >> >> server_config['tablespace_path']
> >>>> >> >> KeyError: 'tablespace_path'
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> ------------------------------------------------------------
> ----------
> >>>> >> >> Ran 14 tests in 9.326s
> >>>> >> >>
> >>>> >> >> FAILED (errors=4)
> >>>> >> >>
> >>>> >> >> On Mon, Aug 8, 2016 at 3:07 PM, Navnath Gadakh
> >>>> >> >> <navnath(dot)gadakh(at)enterprisedb(dot)com> wrote:
> >>>> >> >> > Hi Dave,
> >>>> >> >> > Please find the updated patch for API unit test cases for
> >>>> >> >> > Roles
> >>>> >> >> > and
> >>>> >> >> > Tablespaces nodes
> >>>> >> >> > As we finalized
> >>>> >> >> > Now,
> >>>> >> >> > 1. The user will specify the tablespace path in
> >>>> >> >> > test_config.json.in
> >>>> >> >> > 2. If tablespace path not found, skip the test cases for
> that
> >>>> >> >> > server(Only tablespace test cases)
> >>>> >> >> > 3. Add the skipped test summary in the test result. (Now
> it's
> >>>> >> >> > showing on
> >>>> >> >> > console + in log file, but need to update in a final enhanced
> >>>> >> >> > test
> >>>> >> >> > summary
> >>>> >> >> > report. Which is research point we will work on that after
> >>>> >> >> > finishing
> >>>> >> >> > all
> >>>> >> >> > nodes API test cases)
> >>>> >> >> > 4. Removed the test_ prefix from the values in the config
> >>>> >> >> > files.
> >>>> >> >> >
> >>>> >> >> > Thanks!
> >>>> >> >> >
> >>>> >> >> >
> >>>> >> >> > On Thu, Aug 4, 2016 at 5:55 PM, Dave Page
> >>>> >> >> > <dave(dot)page(at)enterprisedb(dot)com>
> >>>> >> >> > wrote:
> >>>> >> >> >>
> >>>> >> >> >> On Thu, Aug 4, 2016 at 1:02 PM, Navnath Gadakh
> >>>> >> >> >> <navnath(dot)gadakh(at)enterprisedb(dot)com> wrote:
> >>>> >> >> >> > Hi Dave,
> >>>> >> >> >> >
> >>>> >> >> >> > On Thu, Aug 4, 2016 at 4:04 PM, Dave Page
> >>>> >> >> >> > <dave(dot)page(at)enterprisedb(dot)com>
> >>>> >> >> >> > wrote:
> >>>> >> >> >> >>
> >>>> >> >> >> >> Hi
> >>>> >> >> >> >>
> >>>> >> >> >> >> On Thu, Aug 4, 2016 at 10:27 AM, Navnath Gadakh
> >>>> >> >> >> >> <navnath(dot)gadakh(at)enterprisedb(dot)com> wrote:
> >>>> >> >> >> >>
> >>>> >> >> >> >> >> Oh - does the per-server config override the main
> config?
> >>>> >> >> >> >> >> That's
> >>>> >> >> >> >> >> useful. So anything that's in test_advanced_config.py
> can
> >>>> >> >> >> >> >> be
> >>>> >> >> >> >> >> overridden on a per-server basis in test_config.py?
> >>>> >> >> >> >> >
> >>>> >> >> >> >> > No.
> >>>> >> >> >> >> > per-server i.e advance
> >>>> >> >> >> >> > config(test_advanced_config.json.in)
> >>>> >> >> >> >> > and
> >>>> >> >> >> >> > main
> >>>> >> >> >> >> > config(test_config.json) both are different files. In
> main
> >>>> >> >> >> >> > config
> >>>> >> >> >> >> > we
> >>>> >> >> >> >> > just
> >>>> >> >> >> >> > mention the server’s credentials.(We can also mention
> per
> >>>> >> >> >> >> > server
> >>>> >> >> >> >> > credentails) and in test_advanced_config.json.in(here
> we
> >>>> >> >> >> >> > say
> >>>> >> >> >> >> > per-server
> >>>> >> >> >> >> > config)
> >>>> >> >> >> >> > we mention the advanced configurations i.e. test data
> for
> >>>> >> >> >> >> > each
> >>>> >> >> >> >> > node.
> >>>> >> >> >> >>
> >>>> >> >> >> >> OK.
> >>>> >> >> >> >>
> >>>> >> >> >> >> > So, let's summarize the discussion:
> >>>> >> >> >> >> > - Let user specify the tablespace path in
> >>>> >> >> >> >> > test_advanced_config.json.in
> >>>> >> >> >> >>
> >>>> >> >> >> >> No - test_config.py. It should be per-server.
> >>>> >> >> >> >
> >>>> >> >> >> > We don't have a file named 'test_config.py' but we
> have a
> >>>> >> >> >> > server's
> >>>> >> >> >> > credential file named 'test_config.json'.
> >>>> >> >> >> > So, you are saying the tablespace path to be added in
> >>>> >> >> >> > 'test_config.json'.
> >>>> >> >> >> > Am I correct?
> >>>> >> >> >>
> >>>> >> >> >> Yeah, sorry. It should be a property of the server
> >>>> >> >> >> configuration.
> >>>> >> >> >>
> >>>> >> >> >>
> >>>> >> >> >> --
> >>>> >> >> >> Dave Page
> >>>> >> >> >> VP, Chief Architect, Tools & Installers
> >>>> >> >> >> EnterpriseDB: http://www.enterprisedb.com
> >>>> >> >> >> The Enterprise PostgreSQL Company
> >>>> >> >> >>
> >>>> >> >> >> Blog: http://pgsnake.blogspot.com
> >>>> >> >> >> Twitter: @pgsnake
> >>>> >> >> >
> >>>> >> >> >
> >>>> >> >> >
> >>>> >> >> >
> >>>> >> >> > --
> >>>> >> >> > Thanks,
> >>>> >> >> > Navnath Gadakh
> >>>> >> >> > Software Engineer
> >>>> >> >> > EnterpriseDB Corporation
> >>>> >> >> > Mobile: +91 9975389878
> >>>> >> >> >
> >>>> >> >> >
> >>>> >> >>
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> --
> >>>> >> >> Dave Page
> >>>> >> >> VP, Chief Architect, Tools & Installers
> >>>> >> >> EnterpriseDB: http://www.enterprisedb.com
> >>>> >> >> The Enterprise PostgreSQL Company
> >>>> >> >>
> >>>> >> >> Blog: http://pgsnake.blogspot.com
> >>>> >> >> Twitter: @pgsnake
> >>>> >> >
> >>>> >> >
> >>>> >> >
> >>>> >> >
> >>>> >> > --
> >>>> >> > Thanks,
> >>>> >> > Navnath Gadakh
> >>>> >> > Software Engineer
> >>>> >> > EnterpriseDB Corporation
> >>>> >> > Mobile: +91 9975389878
> >>>> >> >
> >>>> >> >
> >>>> >>
> >>>> >>
> >>>> >>
> >>>> >> --
> >>>> >> Dave Page
> >>>> >> VP, Chief Architect, Tools & Installers
> >>>> >> EnterpriseDB: http://www.enterprisedb.com
> >>>> >> The Enterprise PostgreSQL Company
> >>>> >>
> >>>> >> Blog: http://pgsnake.blogspot.com
> >>>> >> Twitter: @pgsnake
> >>>> >
> >>>> >
> >>>> >
> >>>> >
> >>>> > --
> >>>> > Thanks,
> >>>> > Navnath Gadakh
> >>>> > Software Engineer
> >>>> > EnterpriseDB Corporation
> >>>> > Mobile: +91 9975389878
> >>>> >
> >>>> >
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Dave Page
> >>>> VP, Chief Architect, Tools & Installers
> >>>> EnterpriseDB: http://www.enterprisedb.com
> >>>> The Enterprise PostgreSQL Company
> >>>>
> >>>> Blog: http://pgsnake.blogspot.com
> >>>> Twitter: @pgsnake
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Thanks,
> >>> Navnath Gadakh
> >>> Software Engineer
> >>> EnterpriseDB Corporation
> >>> Mobile: +91 9975389878
> >>>
> >>>
> >>
> >>
> >>
> >> --
> >> Best,
> >> Priyanka
> >>
> >> EnterpriseDB Corporation
> >> The Enterprise PostgreSQL Company
> >
> >
> >
> > --
> > Dave Page
> > VP, Chief Architect, Tools & Installers
> > EnterpriseDB: http://www.enterprisedb.com
> > The Enterprise PostgreSQL Company
> >
> > Blog: http://pgsnake.blogspot.com
> > Twitter: @pgsnake
>
>
>
> --
> Dave Page
> VP, Chief Architect, Tools & Installers
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>

--
Best,
Priyanka

EnterpriseDB Corporation
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2016-08-19 10:00:09 pgAdmin 4 commit: Fix validation of numeric preference min/max values.
Previous Message Surinder Kumar 2016-08-19 09:55:36 [pgAdmin4][Patch]: Feature #1406 - Allow setting to use spaces instead of tab in query editor