使用 Flyway 应用程序与 Pax Exam 集成来测试 OSGi 应用程序

发布于 2024-12-27 12:51:06 字数 876 浏览 4 评论 0原文

尝试使用Flyway应用程序集成来测试使用Pax Exam,我收到以下错误:

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

当我实例化新的 Flyway 时,

Flyway flyway = new Flyway(); 

我正在配置Flyway 和 javax.sql 因此:

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")),
...
);

是否有适当的方法来执行此操作,以便 Flyway 知道 javax.sql

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

好菇凉咱不稀罕他 2025-01-03 12:51:06

此处已报告此问题:https://github.com/flyway/flyway/issues/118
请随意加注星标。 :-)

我将考虑解决这个问题,并在下一个版本中及时将 OSGi 环境的适当集成测试添加到 Flyway 构建中。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文