2 channelv186 channelv186 于 2015.06.09 01:07 提问

ubuntu下hadoop-2.6.0测试用例运行失败

Results :

Failed tests:
TestTableMapping.testClearingCachedMappings:144 expected:</[rack1]> but was:</[default-rack]>
TestTableMapping.testTableCaching:79 expected:</[rack1]> but was:</[default-rack]>
TestTableMapping.testResolve:56 expected:</[rack1]> but was:</[default-rack]>
TestDecayRpcScheduler.testAccumulate:136 expected: but was:
TestDecayRpcScheduler.testPriority:203 expected: but was:

Tests run: 2723, Failures: 5, Errors: 0, Skipped: 91

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Hadoop Main ................................ SUCCESS [4.300s]
[INFO] Apache Hadoop Project POM ......................... SUCCESS [2.250s]
[INFO] Apache Hadoop Annotations ......................... SUCCESS [7.805s]
[INFO] Apache Hadoop Assemblies .......................... SUCCESS [1.006s]
[INFO] Apache Hadoop Project Dist POM .................... SUCCESS [8.227s]
[INFO] Apache Hadoop Maven Plugins ....................... SUCCESS [9.390s]
[INFO] Apache Hadoop MiniKDC ............................. SUCCESS [22.836s]
[INFO] Apache Hadoop Auth ................................ SUCCESS [40.704s]
[INFO] Apache Hadoop Auth Examples ....................... SUCCESS [4.181s]
[INFO] Apache Hadoop Common .............................. FAILURE [27:26.889s]
[INFO] Apache Hadoop NFS ................................. SKIPPED
[INFO] Apache Hadoop KMS ................................. SKIPPED
[INFO] Apache Hadoop Common Project ...................... SKIPPED
[INFO] Apache Hadoop HDFS ................................ SKIPPED
[INFO] Apache Hadoop HttpFS .............................. SKIPPED
[INFO] Apache Hadoop HDFS BookKeeper Journal ............. SKIPPED
[INFO] Apache Hadoop HDFS-NFS ............................ SKIPPED
[INFO] Apache Hadoop HDFS Project ........................ SKIPPED
[INFO] hadoop-yarn ....................................... SKIPPED
[INFO] hadoop-yarn-api ................................... SKIPPED
[INFO] hadoop-yarn-common ................................ SKIPPED
[INFO] hadoop-yarn-server ................................ SKIPPED
[INFO] hadoop-yarn-server-common ......................... SKIPPED
[INFO] hadoop-yarn-server-nodemanager .................... SKIPPED
[INFO] hadoop-yarn-server-web-proxy ...................... SKIPPED
[INFO] hadoop-yarn-server-applicationhistoryservice ...... SKIPPED
[INFO] hadoop-yarn-server-resourcemanager ................ SKIPPED
[INFO] hadoop-yarn-server-tests .......................... SKIPPED
[INFO] hadoop-yarn-client ................................ SKIPPED
[INFO] hadoop-yarn-applications .......................... SKIPPED
[INFO] hadoop-yarn-applications-distributedshell ......... SKIPPED
[INFO] hadoop-yarn-applications-unmanaged-am-launcher .... SKIPPED
[INFO] hadoop-yarn-site .................................. SKIPPED
[INFO] hadoop-yarn-registry .............................. SKIPPED
[INFO] hadoop-yarn-project ............................... SKIPPED
[INFO] hadoop-mapreduce-client ........................... SKIPPED
[INFO] hadoop-mapreduce-client-core ...................... SKIPPED
[INFO] hadoop-mapreduce-client-common .................... SKIPPED
[INFO] hadoop-mapreduce-client-shuffle ................... SKIPPED
[INFO] hadoop-mapreduce-client-app ....................... SKIPPED
[INFO] hadoop-mapreduce-client-hs ........................ SKIPPED
[INFO] hadoop-mapreduce-client-jobclient ................. SKIPPED
[INFO] hadoop-mapreduce-client-hs-plugins ................ SKIPPED
[INFO] Apache Hadoop MapReduce Examples .................. SKIPPED
[INFO] hadoop-mapreduce .................................. SKIPPED
[INFO] Apache Hadoop MapReduce Streaming ................. SKIPPED
[INFO] Apache Hadoop Distributed Copy .................... SKIPPED
[INFO] Apache Hadoop Archives ............................ SKIPPED
[INFO] Apache Hadoop Rumen ............................... SKIPPED
[INFO] Apache Hadoop Gridmix ............................. SKIPPED
[INFO] Apache Hadoop Data Join ........................... SKIPPED
[INFO] Apache Hadoop Ant Tasks ........................... SKIPPED
[INFO] Apache Hadoop Extras .............................. SKIPPED
[INFO] Apache Hadoop Pipes ............................... SKIPPED
[INFO] Apache Hadoop OpenStack support ................... SKIPPED
[INFO] Apache Hadoop Amazon Web Services support ......... SKIPPED
[INFO] Apache Hadoop Client .............................. SKIPPED
[INFO] Apache Hadoop Mini-Cluster ........................ SKIPPED
[INFO] Apache Hadoop Scheduler Load Simulator ............ SKIPPED
[INFO] Apache Hadoop Tools Dist .......................... SKIPPED
[INFO] Apache Hadoop Tools ............................... SKIPPED
[INFO] Apache Hadoop Distribution ........................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29:15.906s
[INFO] Finished at: Tue Jun 09 01:10:59 CST 2015
[INFO] Final Memory: 65M/202M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on project hadoop-common: There are test failures.
[ERROR]
[ERROR] Please refer to /home/cj/workspace/hadoop-2.6.0-src/hadoop-common-project/hadoop-common/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :hadoop-common

3个回答

LogicTeamLeader
LogicTeamLeader   2015.06.09 10:28

看看这5行:

 Failed tests: 
TestTableMapping.testClearingCachedMappings:144 expected:</[rack1]> but was:</[default-rack]>
TestTableMapping.testTableCaching:79 expected:</[rack1]> but was:</[default-rack]>
TestTableMapping.testResolve:56 expected:</[rack1]> but was:</[default-rack]>
TestDecayRpcScheduler.testAccumulate:136 expected: but was:
TestDecayRpcScheduler.testPriority:203 expected: but was:

是不是配置文件没有写对,或者程序中相应的配置没有写对?

channelv186
channelv186   2015.06.12 20:07

csdn很冷清啊,提了问题,回答人数好少,终于解决了,在涉及到所有项目的pom.xml文件的**maven-surefire-plugin**加上** true**
就像如下:

org.apache.maven.plugins
maven-surefire-plugin


${java.home}

true

然后编译时执行如下的命令:
mvn package -Pdist,native,docs -DeskipTests -Dtar -Dmaven.test.failure.ignore=true

channelv186
channelv186   2015.06.12 20:09

csdn很冷清啊,提了问题,回答人数好少,终于解决了,在涉及到所有项目的pom.xml文件的**maven-surefire-plugin**加上
true

就像如下:


org.apache.maven.plugins
maven-surefire-plugin


${java.home}

true

然后编译时执行如下的命令:
mvn package -Pdist,native,docs -DeskipTests -Dtar -Dmaven.test.failure.ignore=true

Csdn user default icon
上传中...
上传图片
插入图片