You have the following lines in your application.properties file which is located in the test/resources folder :
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.url=jdbc:h2:file:~/testdb
spring.datasource.username=user
spring.datasource.password=password
Also, you have the following class for repository testing:
@DataJpaTest
@Sql({"/schema.sql", "/data.sql"})
class ApplicationTests {
@Autowired
private UserRepository userRepository;
@Test
void testDefiningSizeOfTable() {
List<Product> userList = userRepository.findAll();
assertEquals(10, userList.size());
}
}
Which database will be used in this test class?