Problem/Motivation

(From #1212992: Prevent tests from deleting main installation's tables when parent::setUp() is not called.)

  • If a test method disables a module during the course of the test's execution, that module's database tables will not be cleaned during tearDown(), because it retrieves the list of tables using drupal_get_schema().

    One test which shows this behavior is the Field API -> Field info tests (FieldInfoTestCase).

Proposed resolution

  • TBD

Remaining tasks

  • TBD

User interface changes

  • None.

API changes

  • None.

Comments

xjm’s picture

Title: Tables are not deleted when a module is disabled during text execution » Tables are not deleted when a module is disabled during test execution
sun’s picture

Status: Active » Closed (duplicate)

I didn't know of this issue. But apparently, my follow-up patch in #1541958-18: Split setUp() into specific sub-methods fixes this issue. So sorry! ;)

catch’s picture

Title: Tables are not deleted when a module is disabled during test execution » Tests for: Tables are not deleted when a module is disabled during test execution
Status: Closed (duplicate) » Active
amateescu’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)

I've added tests that all test tables are deleted in #1713332-40: The SQLite database driver fails to drop simpletest tables.

Dave Reid’s picture