Page MenuHomePhabricator

Running unit tests on sqlite doesn't seem to always delete temporary tables
Open, Needs TriagePublic


If I just want to run specific unit tests, I sometimes use a command like:

./w/git/tests/phpunit/phpunit.php tests/phpunit/includes/LinkerTest.php

This seems to work fine on mysql. on sqlite it works fine the first time, but on subsequent runs I get:

A database query error has occurred.
Query: CREATE VIRTUAL TABLE "unittest_parsertest_searchindex" USING FTS3(
Function: DatabaseSqlite::duplicateTableStructure
Error: 1 table "unittest_parsertest_searchindex" already exists

If I manually delete the table, things work again.

Expected behaviour:
Unit tests delete temp tables during tear down.