Issue 18017
Add JUnit "Suite" to registry Integration tests
18017
Reporter: cgendreau
Assignee: cgendreau
Type: Improvement
Summary: Add JUnit "Suite" to registry Integration tests
Priority: Major
Status: Open
Created: 2015-11-05 13:53:13.974
Updated: 2015-11-05 13:53:13.974
Description: Currently (version 2.38) it is not possible to use the "reuseForks in our motherpom (reverted in https://github.com/gbif/motherpom/commit/714de646733e28fbaa3643be4853041ebc10e546) without breaking the registry integration tests.
This will result in:
"java.sql.SQLException: Pool has been shutdown
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:89)
"
The issue is coming from the fact that the "after()" method of LiquibaseInitializer will be called after the execution of each test classes. The method will run "dataSource.close()". Based on testing and examples, it seems that the scope of the "@ClassRule" annotation is per test classes.
We could fix this issue by creating a "Suite" to run all tests that requires a database and then speed up the running time for integration tests.
Suite documentation from JUnit:
https://github.com/junit-team/junit/wiki/Aggregating-tests-in-suites]]>