New @DataJpaTest in spring-boot 1.4 and relation with application.properties
<p>I'm updating my code with the new Spring Boot 1.4 features, and in my integration tests I was trying to use the new <code>@DataJpaTest</code> annotation. I'm having problems with the .sql files that I would like to run, some of them for the integration tests only, and another one for the future production database.</p>

<p>In my integration tests I'm using the <code>@Sql</code> annotation, with the .sql files inside the <code>/src/test/resources</code> directory and the H2 in-memory database for it. For production I'm using the mysql database, and I have a <code>data-mysql.sql</code> file inside <code>/src/main/resources</code>.</p>

<p>When I run my integration tests, I was hoping to see only the files inside <code>/src/test/resources</code> being executed, but even my <code>data-mysql.sql</code> is being executed.</p>

<p>Is this a normal behaviour? Is there a simple to change this?</p>

<p>Sample code:</p>

<pre><code>@RunWith(SpringRunner.class)
@DataJpaTest
@Sql("/test-data.sql")
public class CdrIntegrationTest {
     // any tests here
}
</code></pre>

<p>And my "production" configs are these ones:</p>

<pre><code>spring.jpa.hibernate.use-new-id-generator-mappings=true
spring.datasource.url=jdbc:mysql://localhost/prod
spring.datasource.username=root
spring.datasource.password=***
spring.datasource.initialize=true
spring.datasource.platform=mysql
</code></pre>

<p>Thanks for any help.</p>