Repository navigation
SQLSTATE[HY000]: General error: 11 database disk image is malformed #810
Unanswered
matthew-gill
asked this question in
Q&A
Replies: 2 comments 1 reply
|
The issue is that you're using your database in parallel from multiple tests, and somehow it's getting mangled. Are you using SQLite by any chance? In any case, you need something to parallelize the database use too. You either create N parallel databases using the test token, or you can leverage some additional library like the DoctrineTestBundle (if you use Doctrine), which wraps every test in a transaction that gets rollbacked at the end, regardless of the test outcome. PS: @Slamdunk would you be ok with moving these kind of questions to Discussions? |
1 reply
Sure, go for it 👍 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
I'm using paratest for Symfony integration tests.
However, I seem to consistently getting the message
SQLSTATE[HY000]: General error: 11 database disk image is malformedfor some of my tests.I've checked that the database is being set up correctly, and the tests pass locally using phpunit.
I'm struggling on how to debug this behaviour. I've been playing whack-a-mole to get paratest working and these are the last 6 tests until we're fully parallel!
I'm not necessarily asking for specific help on my test code, but any experience anybody has had with this error before, how did you debug it etc?
Current behavior
Some tests exit with
SQLSTATE[HY000]: General error: 11 database disk image is malformedHow to reproduce: command, code and error stack trace
Expected behavior
The tests pass!
All reactions