Skip to content

Strange exception when running tests in CI #19

@ptrzyna

Description

@ptrzyna

Hi,

I'm getting a very strange exception when running tests that use flyway extension in the CI box (bamboo). Tests seem to work perfectly fine locally. It appears that configuration cannot be found.

This is how our tests are annotated. Application.class is the java spring config. We are using spring boot and all of our db settings come from application.properties.

@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class)
@TransactionConfiguration
@TestExecutionListeners({DependencyInjectionTestExecutionListener.class, FlywayTestExecutionListener.class })
@FlywayTest

This is the exception we are seeing in the CI box:

org.flywaydb.test.junit.FlywayTestExecutionListener@54997f67] to process 'before class' callback for test class [class com.test.service.FormActualServiceTest]
build   18-Mar-2015 14:05:52    
build   18-Mar-2015 14:05:52    java.lang.IllegalArgumentException: Annotation class com.sun.proxy.$Proxy10 was set, but no Flyway configuration was given.
build   18-Mar-2015 14:05:52        at org.flywaydb.test.junit.FlywayTestExecutionListener.dbResetWithAnotation(FlywayTestExecutionListener.java:280)
build   18-Mar-2015 14:05:52        at org.flywaydb.test.junit.FlywayTestExecutionListener.beforeTestClass(FlywayTestExecutionListener.java:152)
build   18-Mar-2015 14:05:52        at org.springframework.test.context.TestContextManager.beforeTestClass(TestContextManager.java:179)
build   18-Mar-2015 14:05:52        at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:60)
build   18-Mar-2015 14:05:52        at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68)
build   18-Mar-2015 14:05:52        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
build   18-Mar-2015 14:05:52        at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163)
build   18-Mar-2015 14:05:52        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
build   18-Mar-2015 14:05:52        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
build   18-Mar-2015 14:05:52        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
build   18-Mar-2015 14:05:52        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
build   18-Mar-2015 14:05:52        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
build   18-Mar-2015 14:05:52        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

Any help would be greatly appreciated.

Thanks,
-Paul

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions