4 Replies Latest reply on Aug 31, 2012 3:15 PM by jfrenetic

    @CleanupUsingScript with phase=NONE?

    jfrenetic Newbie

      OK, this is funny

       

      Here is my test:

       

      @Test
      @CleanupUsingScript(phase = TestExecutionPhase.NONE)
      @DataSource("jdbc/TestPool")
      @UsingDataSet("init.xml")
      public void testStuff() { }
      

       

      This is what I get when running it:

       

      org.jboss.arquillian.persistence.exception.InvalidResourceLocation: Unable to locate cleanup-com.example.arqtest.SimpleTest#testStuff.sql. File does not exist also in default location scripts/
                at org.jboss.arquillian.persistence.metadata.provider.ResourceProvider.determineLocation(ResourceProvider.java:165)
                at org.jboss.arquillian.persistence.metadata.provider.SqlScriptProvider.createDescriptor(SqlScriptProvider.java:63)
                at org.jboss.arquillian.persistence.metadata.provider.SqlScriptProvider.createDescriptor(SqlScriptProvider.java:35)
                at org.jboss.arquillian.persistence.metadata.provider.ResourceProvider.getDescriptorsDefinedFor(ResourceProvider.java:87)
                at org.jboss.arquillian.persistence.metadata.provider.ResourceProvider.getDescriptors(ResourceProvider.java:76)
                at org.jboss.arquillian.persistence.deployment.PersistenceExtensionDynamicDependencyAppender.fetchAllDataResources(PersistenceExtensionDynamicDependencyAppender.java:98)
      

       

      I know, it doesn't make sense using @CleanupUsingScript with phase=TestExecutionPhase.NONE, but I guess the exception is wrong in this case, and should be easy to fix