[pgadmin-hackers] Feature test issues - Mailing list pgadmin-hackers

From Dave Page
Subject [pgadmin-hackers] Feature test issues
Date
Msg-id CA+OCxowpm_8Ee8yCWH7U+A24PqDJkc2rBYWvLZb7yzt2OVqpvQ@mail.gmail.com
Whole thread Raw
Responses Re: [pgadmin-hackers] Feature test issues
Re: [pgadmin-hackers] Feature test issues
List pgadmin-hackers
Hi Tira, George,

I've just been updating our internal automated test system to run the
feature tests, and ran into a couple of additional issues that need to
be addressed. Can you look into the following please?

- When starting pgAdmin, it's using the default configuration database
(CONFIG['SQLITE_PATH']), however for testing we should be using
CONFIG['TEST_SQLITE_PATH']). This means that it's polluting the user's
default configuration (and if they don't have one, causing an
additional initialisation step).

- With Python 2.6, the following failure is seen when the first
feature test is run:

Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/pgadmin4-master-python26/web/regression/runtests.py",
line 286, in <module>
    verbosity=2).run(suite)
  File
"/var/lib/jenkins/workspace/pgadmin4-master-python26/pgadmin-venv/lib/python2.6/site-packages/unittest2/runner.py",
line 172, in run
    test(result)
  File
"/var/lib/jenkins/workspace/pgadmin4-master-python26/pgadmin-venv/lib/python2.6/site-packages/unittest2/suite.py",
line 87, in __call__
    return self.run(*args, **kwds)
  File
"/var/lib/jenkins/workspace/pgadmin4-master-python26/pgadmin-venv/lib/python2.6/site-packages/unittest2/suite.py",
line 126, in run
    test(result)
  File
"/var/lib/jenkins/workspace/pgadmin4-master-python26/pgadmin-venv/lib/python2.6/site-packages/unittest2/case.py",
line 673, in __call__
    return self.run(*args, **kwds)
  File
"/var/lib/jenkins/workspace/pgadmin4-master-python26/pgadmin-venv/lib/python2.6/site-packages/unittest2/case.py",
line 633, in run
    self._feedErrorsToResult(result, outcome.errors)
  File
"/var/lib/jenkins/workspace/pgadmin4-master-python26/pgadmin-venv/lib/python2.6/site-packages/unittest2/case.py",
line 563, in _feedErrorsToResult
    if issubclass(exc_info[0], self.failureException):
TypeError: issubclass() arg 2 must be a class or tuple of classes

For completeness, other issues outstanding that we've previously discussed:

- pgAdmin processes may remain running after test failures.

- The test suite may hang following a feature test failure, at the end
of the run.

- The screenshot functionality should be fixed (ideally) or removed.

- The tests really need to run with a single instantiation of pgAdmin.
It's clearly going to be far too slow to start/stop pgAdmin for every
test once we start adding more (and moving forward, I really want
feature tests to become the default to ensure we're end-to-end testing
everything). For reference, each test run (currently one version of
Python, against 5 different database servers) is now taking ~5 minutes
vs. 1m47s without the feature tests.

On the plus side, test runs are now green across the board with
feature tests enabled, except for Python 2.6 :-)

Thanks!

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

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


pgadmin-hackers by date:

Previous
From: Atira Odhner
Date:
Subject: Re: [pgadmin-hackers] [patch] Refactor: clipboard, translations, jasmine
Next
From: Dave Page
Date:
Subject: [pgadmin-hackers] pgAdmin 4 commit: Merge the Python 2 & 3 requirements files,and break