防止在测试范围内运行import.sql

时间:2018-04-12 07:59:13

标签: spring-boot testing

如何阻止在main / resources中运行import.sql文件而不删除或清除测试范围内的文件?

@RunWith(SpringRunner.class)
@DataJpaTest
public class SomeIntegrationTest {

    @Autowired
    private SomeRepository someRepository;

    @Before
    public void setUp() throws Exception {

    }

    @After
    public void tearDown() throws Exception {
    }

}

当我运行测试时,import.sql总是执行:

INFO 16501 --- [           main] o.h.t.schema.internal.SchemaCreatorImpl  : HHH000476: Executing import script 'ScriptSourceInputFromUrl(file:/Users/SomeUser/Projects/PRJ/space/backend/service/someService/out/production/resources/import.sql)'

0 个答案:

没有答案