3 Replies Latest reply on May 19, 2014 7:03 AM by Bartosz Majsak

    Persistence Alpha 7 + @ApplyScriptBefore: tests are green although they shouldn't

    Thomas Küstermann Newbie



      I would like to apply a SQL script before and after each test is executed. My test case looks a bit like this:


      public class PersistenceIT {
         // @Deployment ...
         public void shouldFail() {
             Assert.fail("should fail, but doesn't");


      The issue is that this simple test case should fail, but what I get instead is a green bar. Seems that the test method is not even executed.


      I tried to remove the Apply annotations on the class level, but got the same erroneous green bar:


      @ApplyScriptBefore({ "deploy-db-functionality.sql", "trigger-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.


      Looks like a bug, am I right?