Test failing on postgres 9.3: column "procpid" does not exist

Bug #1461598 reported by Alberto Donato on 2015-06-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Storm
Medium
Alberto Donato

Bug Description

One of tests with Postgres fails on 9.2+ because of rename of "pg_stat_activity.procpid" to "pid".

ERROR: tests.databases.postgres.PostgresDisconnectionTestWithoutProxyUnixSockets.test_terminated_backend (subunit.RemotedTestCase)
tests.databases.postgres.PostgresDisconnectionTestWithoutProxyUnixSockets.test_terminated_backend
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/home/ack/canonical/src/storm/trunk/tests/mocker.py", line 102, in test_method_wrapper
    result = test_method()
  File "/home/ack/canonical/src/storm/trunk/tests/databases/postgres.py", line 675, in test_terminated_backend
    terminate_all_backends(self.database)
  File "/home/ack/canonical/src/storm/trunk/tests/databases/postgres.py", line 70, in terminate_all_backends
    terminate_other_backends(connection)
  File "/home/ack/canonical/src/storm/trunk/tests/databases/postgres.py", line 61, in terminate_other_backends
    "SELECT pg_terminate_backend(procpid)"
  File "/home/ack/canonical/src/storm/trunk/storm/databases/postgres.py", line 266, in execute
    return Connection.execute(self, statement, params, noresult)
  File "/home/ack/canonical/src/storm/trunk/storm/database.py", line 241, in execute
    raw_cursor = self.raw_execute(statement, params)
  File "/home/ack/canonical/src/storm/trunk/storm/databases/postgres.py", line 276, in raw_execute
    return Connection.raw_execute(self, statement, params)
  File "/home/ack/canonical/src/storm/trunk/storm/database.py", line 374, in raw_execute
    self._run_execution(raw_cursor, args, params, statement)
  File "/home/ack/canonical/src/storm/trunk/storm/database.py", line 388, in _run_execution
    self._check_disconnect(raw_cursor.execute, *args)
  File "/home/ack/canonical/src/storm/trunk/storm/database.py", line 454, in _check_disconnect
    return function(*args, **kwargs)
psycopg2.ProgrammingError: column "procpid" does not exist
LINE 1: SELECT pg_terminate_backend(procpid) FROM pg_stat_activity ...

Related branches

Alberto Donato (ack) on 2015-06-04
Changed in storm:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers