Opened 13 years ago

Last modified 13 years ago

#1237 defect closed fixed (fixed)

test_adbapi fails with "relation `simple' already exists" sometimes

Reported by: Jean-Paul Calderone Owned by:
Priority: high Milestone:
Component: core Keywords: core
Cc: Jean-Paul Calderone, Dave Peticolas Branch:


Change History (3)

comment:1 Changed 13 years ago by Jean-Paul Calderone

[ERROR]: twisted.test.test_adbapi.PyPgSQLReconnectTestCase.testPool

  File "/home/buildbot/run/full2.2/Twisted/twisted/internet/", line 109,
in maybeDeferred
    result = f(*args, **kw)
  File "/home/buildbot/run/full2.2/Twisted/twisted/test/", line
217, in setUp
  File "/home/buildbot/run/full2.2/Twisted/twisted/test/", line
208, in wait
    return unittest.wait(d, timeout=timeout)
  File "/home/buildbot/run/full2.2/Twisted/twisted/trial/", line 356, in wait
  File "/home/buildbot/run/full2.2/Twisted/twisted/internet/", line
25, in _putResultInDeferred
    result = f(*args, **kwargs)
  File "/home/buildbot/run/full2.2/Twisted/twisted/enterprise/", line
375, in _runInteraction
    result = interaction(trans, *args, **kw)
  File "/home/buildbot/run/full2.2/Twisted/twisted/enterprise/", line
388, in _runOperation
    trans.execute(*args, **kw)
  File "/usr/lib/python2.2/site-packages/pyPgSQL/", line 3072, in execute
    raise OperationalError, msg
libpq.OperationalError: ERROR:  relation "simple" already exists


comment:2 Changed 13 years ago by Dave Peticolas

If for some reason the simple table is not deleted by tearDown,
subsequent tests would fail on setUp. I moved the simple test creation
into the test function so that tearDown will drop the table even if it
causes the test to fail, so the next test will succeed.

Better would be to detect if the table exists and drop it at the
start of the test, but that will require some more work, as it is

comment:3 Changed 7 years ago by <automation>

Owner: Dave Peticolas deleted
Note: See TracTickets for help on using tickets.