You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I pressed control c to stop my tests from running very early in the piece. And now, when I run my tests I see
$ codecept run tests/
Codeception PHP Testing Framework v4.2.2 https://helpukrainewin.org
Powered by PHPUnit 9.5.27 by Sebastian Bergmann and contributors.
^C
$ codecept run tests/acceptance_wpbrowser
Codeception PHP Testing Framework v4.2.2 https://helpukrainewin.org
Powered by PHPUnit 9.5.27 by Sebastian Bergmann and contributors.
In bootstrap.php line 150:
Message: One or more database tables are unavailable. The database may need to be <a href="maint/repair.php?referrer=is_blog_installed">repaired</a>.
run [-o|--override OVERRIDE] [-e|--ext EXT] [--report] [--html [HTML]] [--xml [XML]] [--phpunit-xml [PHPUNIT-XML]] [--tap [TAP]] [--json [JSON]] [--colors] [--no-colors] [--silent] [--steps] [-d|--debug] [--bootstrap [BOOTSTRAP]] [--no-redirect] [--coverage [COVERAGE]] [--coverage-html [COVERAGE-HTML]] [--coverage-xml [COVERAGE-XML]] [--coverage-text [COVERAGE-TEXT]] [--coverage-crap4j [COVERAGE-CRAP4J]] [--coverage-cobertura [COVERAGE-COBERTURA]] [--coverage-phpunit [COVERAGE-PHPUNIT]] [--no-exit] [-g|--group GROUP] [-s|--skip SKIP] [-x|--skip-group SKIP-GROUP] [--env ENV] [-f|--fail-fast] [--no-rebuild] [--seed SEED] [--no-artifacts] [--] [<suite> [<test>]]
Presumably I pressed ctrl-c just at the moment that codeception had deleted my wordpress database tables (I'm using it to test wordpress with the lucatume https://github.com/lucatume/wp-browser codeception modification) and hadn't quite rebuilt them.
When I dropped all the artefacts from my test database, and rebuilt the DB with tests/_data/dump.sql it all worked fine again. But it was a bit of a hassle. Is this a problem within codeception, or wp-browser do you think? Seems to me that this should be within a transaction so that if people quit the process, the database can roll back. Unless of course you are using DDL stuff like drop table, truncate table which force an impicit commit.
Details
Codeception version: 4.4.2
PHP Version: 8.0.29
Operating System: ubuntu 22.04
Installation type: Composer
List of installed packages (composer show)
Suite configuration:
# paste suite config here. (an extract from the acceptance_wpbrowser.suite.yml file; WPDb very much like codeception's Db config)..config:
WPDb:
dsn: '%TEST_SITE_DB_DSN%'user: '%TEST_SITE_DB_USER%'password: '%TEST_SITE_DB_PASSWORD%'dump: 'tests/_data/dump.sql'populate: truecleanup: false
Can anything be done about this? Or do I just need to be more careful about pressing ctrl-c?
The text was updated successfully, but these errors were encountered:
What are you trying to achieve?
Run my tests
What do you get instead?
I pressed control c to stop my tests from running very early in the piece. And now, when I run my tests I see
Presumably I pressed ctrl-c just at the moment that codeception had deleted my wordpress database tables (I'm using it to test wordpress with the lucatume https://github.com/lucatume/wp-browser codeception modification) and hadn't quite rebuilt them.
When I dropped all the artefacts from my test database, and rebuilt the DB with
tests/_data/dump.sql
it all worked fine again. But it was a bit of a hassle. Is this a problem within codeception, or wp-browser do you think? Seems to me that this should be within a transaction so that if people quit the process, the database can roll back. Unless of course you are using DDL stuff likedrop table
,truncate table
which force an impicit commit.Details
composer show
)Can anything be done about this? Or do I just need to be more careful about pressing ctrl-c?
The text was updated successfully, but these errors were encountered: