mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Improve @AutoConfigureTestDatabase failure message
Fixes gh-6916
This commit is contained in:
parent
985ee58ad7
commit
82ae6e4049
@ -186,6 +186,10 @@ public class TestDatabaseAutoConfiguration {
|
||||
if (EmbeddedDatabaseConnection.NONE.equals(connection)) {
|
||||
connection = EmbeddedDatabaseConnection.get(getClass().getClassLoader());
|
||||
}
|
||||
Assert.state(connection != EmbeddedDatabaseConnection.NONE,
|
||||
"Cannot determine embedded database for tests. If you want "
|
||||
+ "an embedded database please put a supported one "
|
||||
+ "on the classpath.");
|
||||
return new EmbeddedDatabaseBuilder().setType(connection.getType()).build();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user