]
Bartosz Majsak closed ARQ-1779.
-------------------------------
Resolution: Duplicate Issue
Tests are not executed using combinations of @ApplyScriptBefore /
@ApplyScriptAfter
-----------------------------------------------------------------------------------
Key: ARQ-1779
URL:
https://issues.jboss.org/browse/ARQ-1779
Project: Arquillian
Issue Type: Bug
Components: Extension - Persistence
Affects Versions: persistence_1.0.0.Alpha7
Reporter: Thomas Küstermann
Assignee: Bartosz Majsak
Fix For: persistence_1.0.0.next
Forum reference:
https://community.jboss.org/message/874117
The following test case succeeds (green bar) although it should fail:
{code:java}
@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");
}
}
{code}
Removing class level annotations does not work either:
{code:java}
@Test
@ApplyScriptBefore({ "deploy-db-functionality.sql",
"trigger-db-functionality.sql" })
@ApplyScriptAfter("undeploy-db-functionality.sql")
public void shouldFail() { ... }
{code}
What actually works is to use only one ApplyScriptBefore / ApplyScriptAfter annotation
per test, each with only one script to execute.