Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After running a KernelTestBaseTNG™ the test tables are left in the database.
Comment | File | Size | Author |
---|---|---|---|
#14 | interdiff.txt | 626 bytes | amateescu |
#14 | 2553533-14.patch | 3.96 KB | amateescu |
#11 | 2553533-11.patch | 4.31 KB | hussainweb |
#11 | interdiff-9-11.txt | 3.19 KB | hussainweb |
#9 | 2553533-9.patch | 6.75 KB | dawehner |
Comments
Comment #2
alexpottThis should be testable somehow.
Comment #3
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedCan't we test using the same method I used in #1713332: The SQLite database driver fails to drop simpletest tables, by overriding the
run()
method (or the phpunit equivalent)?Comment #4
alexpott@amateescu everything is destroyed in tearDown so there is nowhere to override like in #1713332: The SQLite database driver fails to drop simpletest tables
Also we have some tests that run set up multiple times generating a new prefix and in the sqlite case files that are not cleaned up in /tmp and an under declared dependency on sqlite.
Comment #5
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedHow about overriding tearDown() itself?
Comment #6
alexpottTried that... after tear down everything is gone.
Comment #7
dawehnerTried out something like this, but for some reason, which is not obvious for me, the \Drupal\Core\Database\Driver\sqlite\Schema::findTables in the tearDown method itself does not find the config table. The next method in \Drupal\KernelTests\KernelTestBaseTest::tearDown then though finds it.
Comment #9
dawehnerReupload.
Comment #10
Wim LeersLooking good!
… and more — all debug leftovers.
Comment #11
hussainwebI think I got them all.
Comment #12
dawehnerIt would be great if @amateescu could have a look at it.
Comment #13
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedI tested the patch on SQLite and I can confirm that it works and the test tables are properly removed at the end of the test run.
Missed one :)
Comment #14
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedNo reason to hold it up over that.
Comment #15
webchickI'll be honest. I have absolutely no idea what this does, but random fails are bad, mmmkay?
Committed and pushed to 8.0.x. ;) Thanks!