Using Flyway application integration with Pax Exam to test OSGi application

210 views Asked by At

When trying to use Flyway application integration to test an OSGi application using Pax Exam, I get the following error:

myTest:myTest.myTest:PaxRunnerTestContainer{felix}(com.example.sys.test.paxtests.myTest): 
javax.sql.DataSource not found by com.googlecode.flyway.core [32]

When I instantiate a new Flyway

Flyway flyway = new Flyway(); 

I am provisioning Flyway and javax.sql thusly:

return provision(
...
wrappedBundle("http://mirrors.ibiblio.org/pub/mirrors/maven2/javax/sql/jdbc-stdext/2.0/jdbc-stdext-2.0-sources.jar"),
wrappedBundle(mavenBundle().groupId("com.googlecode.flyway").artifactId("flyway-core").version("1.5")),
...
);

Is there a proper way to do this so that Flyway is aware of javax.sql?

1

There are 1 answers

1
Axel Fontaine On BEST ANSWER

This has been reported here: https://github.com/flyway/flyway/issues/118 Feel free to star it. :-)

I'll look into fixing this and adding a proper integration test for OSGi environments to the Flyway build in time for the next release.