MariaDB4j: Asked to waitFor but it was never even start()'ed - since 2.4.0
First, thanks for the nice project, it’s of great help!
I’m using it for writing JUnit test. Lately i was upgrading from 2.3.0 to 2.4.0 and got those sporadic failures:
Caused by: ch.vorburger.exec.ManagedProcessException: An error occurred while running a command: create database if not exists `db1`;
at ch.vorburger.mariadb4j.DB.run(DB.java:300)
at ch.vorburger.mariadb4j.DB.run(DB.java:265)
at ch.vorburger.mariadb4j.DB.run(DB.java:269)
at ch.vorburger.mariadb4j.DB.createDB(DB.java:308)
at europa.testsupport.MySqlEnv.createDatabase(MySqlEnv.java:74)
... 78 more
Caused by: ch.vorburger.exec.ManagedProcessException: Asked to waitFor Program [/tmp/europa.domain.space.ListJdbcTablesHandlerTest5747555168995803376/mysql-base/bin/mysql, --socket=/tmp/MariaDB4j.35895.sock] (in working directory /tmp/europa.domain.space.ListJdbcTablesHandlerTest5747555168995803376/mysql-base), but it was never even start()'ed!
at ch.vorburger.exec.ManagedProcess.assertWaitForIsValid(ManagedProcess.java:478)
at ch.vorburger.exec.ManagedProcess.waitForExitMaxMsWithoutLog(ManagedProcess.java:439)
at ch.vorburger.exec.ManagedProcess.waitForExit(ManagedProcess.java:418)
at ch.vorburger.mariadb4j.DB.run(DB.java:298)
Those happended on the build server which is on linux. On my local Mac i hadn’t had those problems. Downgrading to 2.3.0 stabilized everything!
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 31 (1 by maintainers)
Commits related to this issue
- Fix for https://github.com/vorburger/MariaDB4j/issues/233 — committed to cardamon/ch.vorburger.exec by cardamon a year ago
- Fix for https://github.com/vorburger/MariaDB4j/issues/233 — committed to cardamon/ch.vorburger.exec by cardamon a year ago
- Fix for https://github.com/vorburger/MariaDB4j/issues/233 — committed to vorburger/ch.vorburger.exec by cardamon a year ago
- Bump ch.vorburger.exec to 3.1.4 (fixes #233) for https://github.com/vorburger/ch.vorburger.exec/pull/103 and https://github.com/vorburger/ch.vorburger.exec/pull/96 for https://github.com/vorburger/Ma... — committed to MariaDB4j/MariaDB4j by vorburger a year ago
- Initialize MockTexeraDB using JDBC (#1919) This PR addresses the issue of frequent test failures that started occurring after commit #1912. The failure is caused by the initialization of the mock T... — committed to Texera/texera by shengquan-ni a year ago
Instead of this (which does invoke a new process):
I use this:
And it seems like this trick solves the issue.