骆驼失败核心测试案例

时间:2018-09-07 14:56:18

标签: java maven spring-boot apache-camel

我一直在尝试使用“ mvn clean install”命令来构建Camel jetty9项目。

(特别是mvn clean install -pl :camel-jetty9 -am -e

当我运行命令时,它将继续构建并开始运行测试用例。但是,有些测试用例失败了。见下文。

输出

**[ERROR]** org.apache.camel.component.file.FileConsumerExcludeNameTest.testExludePreAndPostfixes(org.apache.camel.component.file.FileConsumerExcludeNameTest)
**[ERROR]**   Run 1: FileConsumerExcludeNameTest>TestSupport.runBare:58->testExludePreAndPostfixes:36 mock://result Message with body Reports1 was expected but not found in [Reports2, Reports3]
**[ERROR]**   Run 2: FileConsumerExcludeNameTest>TestSupport.runBare:58->testExludePreAndPostfixes:36 mock://result Message with body Reports1 was expected but not found in [Reports3]
**[ERROR]**   Run 3: FileConsumerExcludeNameTest>TestSupport.runBare:58->testExludePreAndPostfixes:36 mock://result Message with body Reports1 was expected but not found in [Reports2, Reports3]

**[ERROR]** org.apache.camel.impl.FileWatcherReloadStrategyTest.testUpdateExistingRoute(org.apache.camel.impl.FileWatcherReloadStrategyTest)
**[ERROR]**   Run 1: FileWatcherReloadStrategyTest>TestSupport.runBare:58->testUpdateExistingRoute:122 Should reload file within 20 seconds
**[ERROR]**   Run 2: FileWatcherReloadStrategyTest>TestSupport.runBare:58->testUpdateExistingRoute:122 Should reload file within 20 seconds
**[ERROR]**   Run 3: FileWatcherReloadStrategyTest>TestSupport.runBare:58->testUpdateExistingRoute:122 Should reload file within 20 seconds

**[ERROR]** org.apache.camel.impl.FileWatcherReloadStrategyTest.testUpdateXmlRoute(org.apache.camel.impl.FileWatcherReloadStrategyTest)
**[ERROR]**   Run 1: FileWatcherReloadStrategyTest>TestSupport.runBare:58->testUpdateXmlRoute:162 ▒ ConditionTimeout
**[ERROR]**   Run 2: FileWatcherReloadStrategyTest>TestSupport.runBare:58->testUpdateXmlRoute:180 Should reload file within 20 seconds
**[ERROR]**   Run 3: FileWatcherReloadStrategyTest>TestSupport.runBare:58->testUpdateXmlRoute:162 ▒ ConditionTimeout

Repro

  1. 从github克隆Camel存储库
  2. 输入目录并结帐分支camel-2.22.1
  3. 运行mvn clean install -pl :camel-jetty9 -am -e

环境

  • Windows 10
  • jdk 1.8.0_181
  • Maven 3.5.3
  • 骆驼2.22.1

我尝试过的

我尝试了不同版本的Camel和jdk组合,以查看是否涉及Java更新。但是根据Camel site,Camel 2.14之后的所有版本都可以与我的jdk一起使用,因此我主要尝试使用不同版本的Camel来查看输出是否存在差异。

我的问题

  1. 创建jetty9 jar文件是否需要测试用例?
  2. 我可以简单地删除它们吗?
  3. 这些测试用例是否应通过每个发行版?
  4. 是否有通过这些测试的特定Maven或jdk版本?
  5. 如有必要,我该怎么做以“修复”它们?

谢谢大家。

编辑

我尝试对Camel版本:2.22.0、2.21.0和2.20.0运行相同的过程,但它们都存在相同的问题。 但是,当我尝试2.19.0和2.19.5时,它构建成功。目前正在调查。

1 个答案:

答案 0 :(得分:0)

通过在顶级骆驼pom目录中运行该命令,我也看到了问题。我进入组件目录并运行了相同的命令,它成功了。另外,我也只是通过进入components / camel-jetty9目录并运行“ mvn clean install”进行了测试,这虽然更快并且通过了,但是并未构建所有其他组件。这些之一可能就足够了。

编辑:这是针对最新的骆驼版本2.22.1。 JDK 1.8.0_131,Maven 3.5.0。

相关问题