Quarkus 测试等效于 spring @Sql 注释
Quarkus tests with equivalent of spring @Sql annotation
我正在尝试将 Spring 启动应用移至 Quarkus。在测试中,我们有 @Sql 注释,它们在特定的 @Test 方法之前/之后被调用。 Quarkus 中是否有类似此功能的内容?我所能找到的只是在测试之前创建整个数据库的示例,但我想要的是能够在每种测试方法之前/之后向/从数据库中插入/删除记录。
目前,我们在 Quarkus 中还没有这个功能。
我写了一个 JUnit5 Extension,它使用 Flyway 来做到这一点。请检查:https://github.com/radcortez/flyway-junit5-extensions and the Quarkus example: https://github.com/radcortez/flyway-junit5-extensions/tree/master/examples/quarkus
我正在尝试将 Spring 启动应用移至 Quarkus。在测试中,我们有 @Sql 注释,它们在特定的 @Test 方法之前/之后被调用。 Quarkus 中是否有类似此功能的内容?我所能找到的只是在测试之前创建整个数据库的示例,但我想要的是能够在每种测试方法之前/之后向/从数据库中插入/删除记录。
目前,我们在 Quarkus 中还没有这个功能。
我写了一个 JUnit5 Extension,它使用 Flyway 来做到这一点。请检查:https://github.com/radcortez/flyway-junit5-extensions and the Quarkus example: https://github.com/radcortez/flyway-junit5-extensions/tree/master/examples/quarkus