#21222: ./runtests.py with two Postgress databases hangs infinitly. Did I just
discover a 1.6 release blocker, or am I doing something wrong?
---------------------------------+------------------------------------
     Reporter:  vernondcole      |      Owner:  nobody
         Type:  Uncategorized    |     Status:  new
    Component:  Uncategorized    |    Version:  master
     Severity:  Release blocker  |   Keywords:  runtests infinite wait
 Triage Stage:  Unreviewed       |  Has patch:  0
Easy pickings:  0                |      UI/UX:  0
---------------------------------+------------------------------------
 I decided to get off my duff and start testing django-mssql using django
 1.6 -- to see whether that 1.6 compatible code I put in really works.

 The first step is to get a set of baseline runs of the test suite.

 I checked out the git master & did ./runtests.py --settings=test_sqlite
 ... everything great.
 Ran 6211 tests in 263.111s
 OK (skipped=331, expected failures=11)

 I made another setting like this:

     DATABASES = {
         'default': {
             'ENGINE': 'django.db.backends.postgresql_psycopg2',
             'NAME': 'adotest',
             'USER': 'adotestuser',
             'PASSWORD': '12345678',
             'HOST': 'localhost',
             'OPTIONS': {
                 'autocommit': True,  # should be ignored in django 1.6
                 },
             },
         'other': {
             'ENGINE': 'django.db.backends.sqlite3',
         }
     }

 $ ./runtests.py --settings=test_pg_lite
 Ran 6211 tests in 680.520s
 OK (skipped=249, expected failures=11)

 So lets try with both databases using PostgresSQL...

     DATABASES = {
         'default': {
             'ENGINE': 'django.db.backends.postgresql_psycopg2',
             'NAME': 'adotest',
             'USER': 'adotestuser',
             'PASSWORD': '12345678',
             'HOST': 'localhost',
             'OPTIONS': {
                 'autocommit': True,
                 },
             },
         'other': {
             'ENGINE': 'django.db.backends.postgresql_psycopg2',
             'NAME': 'adotest',
             ## 'TEST_NAME': 'other_test',
             'USER': 'adotestuser',
             'PASSWORD': '12345678',
             'HOST': 'localhost',
             'OPTIONS': {
                 'autocommit': True,
                 },
         }
     }

  $ ./runtests.py --settings=test_pg
 <It prints a screenfull of dots and then stops.  I left it running all
 night -- no progress.>
 <After several retries, I found that if I kill the PostgreSQL instance I
 get...>
 Ran 4826 tests in 1489.312s
 FAILED (failures=27, errors=1482, skipped=239, expected failures=10)

 The first of the 1482 tracebacks after I killed the server was:

     ======================================================================
     ERROR: test_fixture_loading (multiple_database.tests.FixtureTestCase)
     Multi-db fixtures are loaded correctly
     ----------------------------------------------------------------------
     Traceback (most recent call last):
       File "/home/vernon/PycharmProjects/django/django/test/testcases.py",
 line 173, in __call__
         self._pre_setup()
       File "/home/vernon/PycharmProjects/django/django/test/testcases.py",
 line 719, in _pre_setup
         self._fixture_setup()
       File "/home/vernon/PycharmProjects/django/django/test/testcases.py",
 line 853, in _fixture_setup
         self._fixture_teardown()
       File "/home/vernon/PycharmProjects/django/django/test/testcases.py",
 line 865, in _fixture_teardown
         self.atomics[db_name].__exit__(None, None, None)
       File "/home/vernon/PycharmProjects/django/django/db/transaction.py",
 line 352, in __exit__
         connection.set_autocommit(True)
       File
 "/home/vernon/PycharmProjects/django/django/db/backends/__init__.py", line
 335, in set_autocommit
         self._set_autocommit(autocommit)
       File
 
"/home/vernon/PycharmProjects/django/django/db/backends/postgresql_psycopg2/base.py",
 line 186, in _set_autocommit
         self.connection.autocommit = autocommit
     InterfaceError: connection already closed


 Was it me being clumsy, or is this a major bug?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21222>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.e9a1fcd242b43f67d22f929efb3e8963%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to