Make sure that test data sources are unique

pull/7902/head
Stephane Nicoll 8 years ago
parent 941c53dceb
commit 80da80f930

@ -62,6 +62,7 @@ public class AutoConfigureTestDatabaseWithMultipleDatasourcesIntegrationTests {
@Primary
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.HSQL);
return builder.build();
}
@ -69,6 +70,7 @@ public class AutoConfigureTestDatabaseWithMultipleDatasourcesIntegrationTests {
@Bean
public DataSource secondaryDataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.HSQL);
return builder.build();
}

@ -34,6 +34,7 @@ public class ExampleJdbcApplication {
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.HSQL);
return builder.build();
}

@ -61,6 +61,7 @@ public class JdbcTestWithAutoConfigureTestDatabaseReplaceExplicitIntegrationTest
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.H2);
return builder.build();
}

@ -93,6 +93,7 @@ public class TestDatabaseAutoConfigurationTests {
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.HSQL);
return builder.build();
}

@ -76,6 +76,7 @@ public class DataJpaTestWithAutoConfigureTestDatabaseReplaceExplicitIntegrationT
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.H2);
return builder.build();
}

@ -34,6 +34,7 @@ public class ExampleDataJpaApplication {
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.HSQL);
return builder.build();
}

Loading…
Cancel
Save