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
Describe the bug
If Liquibase fails to initialize when running ./mvnw test on a project, the tests that depend on the test database fail silently and do not log any errors.
The tests generate a Warning, but they run to completion and ./mvnw clean install will succeed even though multiple test suites have failed.
[INFO] Running com.mycompany.domain.AuthorityTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.153 s - in com.mycompany.domain.AuthorityTest
[INFO] Running com.mycompany.domain.UserTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 s - in com.mycompany.domain.UserTest
[INFO] Running com.mycompany.config.LocalDateProviderTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.034 s - in com.mycompany.config.LocalDateProviderTest
[INFO] Running com.mycompany.service.mapper.UserMapperTest
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.046 s - in com.mycompany.service.mapper.UserMapperTest
[INFO] Running com.mycompany.ArchTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.711 s - in com.mycompany.ArchTest
[INFO] Running com.mycompany.web.rest.ManagementInfoResourceTest
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.86 s - in com.mycompany.web.rest.ManagementInfoResourceTest
[INFO] Running com.mycompany.web.rest.UserResourceTest
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in com.mycompany.web.rest.UserResourceTest
[INFO] Running com.mycompany.web.rest.AccountResourceTest
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in com.mycompany.web.rest.AccountResourceTest
[INFO] Running com.mycompany.web.rest.UserJWTControllerTest
[WARNING] Tests run: 3, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 0.004 s - in com.mycompany.web.rest.UserJWTControllerTest
[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 17, Failures: 0, Errors: 0, Skipped: 3
[INFO]
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.5:restore-instrumented-classes (restore-ut) @ jhipster ---
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ jhipster ---
[INFO] Building jar: /tmp/gen-test/target/jhipster-1.0.0-SNAPSHOT.jar
[INFO]
[INFO] --- quarkus-maven-plugin:1.12.1.Final:build (default) @ jhipster ---
[INFO] [org.jboss.threads] JBoss Threads version 3.2.0.Final
[INFO] [org.hibernate.Version] HHH000412: Hibernate ORM core version 5.4.28.Final
[INFO] [io.quarkus.deployment.QuarkusAugmentor] Quarkus augmentation completed in 3903ms
[INFO]
[INFO] --- maven-checkstyle-plugin:3.1.0:check (default) @ jhipster ---
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.5:report (report-ut) @ jhipster ---
[INFO] Loading execution data file /tmp/gen-test/target/jacoco/test/test.exec
[INFO] Analyzed bundle 'Jhipster' with 56 classes
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ jhipster ---
[INFO] Installing /tmp/gen-test/target/jhipster-1.0.0-SNAPSHOT.jar to /home/geraldo/.m2/repository/com/mycompany/jhipster/1.0.0-SNAPSHOT/jhipster-1.0.0-SNAPSHOT.jar
[INFO] Installing /tmp/gen-test/pom.xml to /home/geraldo/.m2/repository/com/mycompany/jhipster/1.0.0-SNAPSHOT/jhipster-1.0.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 28.105 s
[INFO] Finished at: 2021-11-01T09:05:19+02:00
[INFO] ------------------------------------------------------------------------
To Reproduce
This issue was triggered by #230, but also occurs anytime that Liquibase fails to initialize. For example, if PostgreSQL is used for unit testing and the database is inconsistent, the same silent behaviour occurs.
If #230 has not been resolved, then you can reproduce the issue by running the generator in an empty folder and immediately running the tests with:
jhipster-quarkus
./mvnw test
The tests will fail to run successfully because the H2 JDBC driver is missing, but they fail silently and just skip over the tests that depend on H2.
If #230 has been resolved, then the issue can also be reproduced when using PostgreSQL (or MySQL) instead of H2 under the following circumstances:
the test database is not running or is otherwise inaccessible
the checksums do not match
the database is in an inconsistent state
there are tables in the test database left-over from previous unsuccessful tests
Expected behaviour
Quarkus should report that the tests that depend on Liquibase have failed, instead of generating a Warning and just skipping them.
The text was updated successfully, but these errors were encountered:
Describe the bug
If Liquibase fails to initialize when running
./mvnw test
on a project, the tests that depend on the test database fail silently and do not log any errors.The tests generate a Warning, but they run to completion and
./mvnw clean install
will succeed even though multiple test suites have failed.To Reproduce
This issue was triggered by #230, but also occurs anytime that Liquibase fails to initialize. For example, if PostgreSQL is used for unit testing and the database is inconsistent, the same silent behaviour occurs.
If #230 has not been resolved, then you can reproduce the issue by running the generator in an empty folder and immediately running the tests with:
The tests will fail to run successfully because the H2 JDBC driver is missing, but they fail silently and just skip over the tests that depend on H2.
If #230 has been resolved, then the issue can also be reproduced when using PostgreSQL (or MySQL) instead of H2 under the following circumstances:
Expected behaviour
Quarkus should report that the tests that depend on Liquibase have failed, instead of generating a Warning and just skipping them.
The text was updated successfully, but these errors were encountered: