-
Bug
-
Resolution: Duplicate
-
Major
-
persistence_1.0.0.Alpha7
-
None
Forum reference: https://community.jboss.org/message/874117
The following test case succeeds (green bar) although it should fail:
@RunWith(Arquillian.class) @DataSource("java:oracleDS") @Cleanup(phase=TestExecutionPhase.NONE) @ApplyScriptBefore("deploy-db-functionality.sql") @ApplyScriptAfter("undeploy-db-functionality.sql") public class PersistenceIT { // @Deployment ... @Test @ApplyScriptBefore("trigger-db-functionality.sql") public void shouldFail() { Assert.fail("should fail, but doesn't"); } }
Removing class level annotations does not work either:
@Test @ApplyScriptBefore({ "deploy-db-functionality.sql", "trigger-db-functionality.sql" }) @ApplyScriptAfter("undeploy-db-functionality.sql") public void shouldFail() { ... }
What actually works is to use only one ApplyScriptBefore / ApplyScriptAfter annotation per test, each with only one script to execute.