【问题标题】:Camel Blueprint Testing骆驼蓝图测试
【发布时间】:2016-10-07 13:52:09
【问题描述】:

我对骆驼和蓝图测试相当陌生,我有一些路由可以丰富请求,尽管在使用蓝图测试进行相同测试时,端点没有被解析。

我正在使用:
骆驼:2.12.0.redhat-611412.
保险丝:6.1.1.
蓝图测试版本:2.12.0.redhat-611412.
Maven:3.1.1。

【问题讨论】:

  • 1.确保拥有所有最新补丁并更新您的依赖项以匹配最新的camel-test-blueprint依赖项..我相信它是:2.12.0.redhat-611454 2.blueprint-test只能运行一个CamelContext..都是你的一种情况下的路线? 3. 有日志信息吗?
  • 我从 src/main/resources 提供了我的蓝图文件的完整路径,结果我只需要从 OSGI-INF 路径中提及,这解决了问题,但给了我一个新问题。现在我的测试只等待 30 秒并放弃等待服务,我尝试在 maven 中启用完整的堆栈跟踪,错误日志为:MyTestClass->camelBlueprintTestSupport.setUp:183->CamelTestS‌​‌​upport.setUp():217‌​->‌​CamelTestSupport‌​.soS‌​etUp():247->Ca‌​melBlu‌​ePrintTestSu‌​pport.cr‌​eateCamelC‌​ontext:352 Runtime 我不知道为什么 BlueprintTest 无法创建 camelContext

标签: unit-testing apache-camel integration-testing blueprint-osgi


【解决方案1】:

端点没有被解析。

Camel 蓝图测试发生这种情况主要是因为 pom.xml 中缺少必要的“运行时”依赖项。更仔细地检查错误日志,看看是否可以找到任何ClassNotFoundException 错误。

【讨论】:

  • 我从 src/main/resources 提供了我的蓝图文件的完整路径,结果我只需要从 OSGI-INF 路径中提及,这解决了问题,但给了我一个新问题。现在我的测试只等待 30 秒并放弃等待服务,我尝试在 maven 中启用完整的堆栈跟踪,错误日志为:MyTestClass->camelBlueprintTestSupport.setUp:183->CamelTestS‌​upport.setUp():217->‌​CamelTestSupport.soS‌​etUp():247->CamelBlu‌​ePrintTestSupport.cr‌​eateCamelContext:352 Runtime 我不知道为什么 BlueprintTest 无法创建 camelContext。
猜你喜欢
  • 2023-04-02
  • 1970-01-01
  • 1970-01-01
  • 2015-01-23
  • 1970-01-01
  • 2017-04-30
  • 2015-05-31
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多