Hi Community:
When I build Skywalking, the Unit test randomly fail by reporting
"surefire-reports for the individual test results".
And each time fail in different test case. Can you tell me why?
Below is an example:
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.17 s -
in org.apache.skywalking.apm.plugin.kafka.KafkaProducerInterceptorTest
[INFO] Running
org.apache.skywalking.apm.plugin.kafka.ProducerConstructorInterceptorTest
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.278 s
<<< FAILURE! - in
org.apache.skywalking.apm.plugin.kafka.KafkaConsumerInterceptorTest
[ERROR]
testConsumerWithMessage(org.apache.skywalking.apm.plugin.kafka.KafkaConsumerInterceptorTest)
Time elapsed: 0.156 s <<< FAILURE!
java.lang.AssertionError:
Expected: is "localhost:9092;localhost:19092"
but: was "test;test-1"
at
org.apache.skywalking.apm.plugin.kafka.KafkaConsumerInterceptorTest.assertConsumerSpan(KafkaConsumerInterceptorTest.java:141)
at
org.apache.skywalking.apm.plugin.kafka.KafkaConsumerInterceptorTest.testConsumerWithMessage(KafkaConsumerInterceptorTest.java:134)
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.206 s
- in org.apache.skywalking.apm.plugin.kafka.ProducerConstructorInterceptorTest
[INFO] Running
org.apache.skywalking.apm.plugin.kafka.ProducerConstructorMapInterceptorTest
[INFO] Running
org.apache.skywalking.apm.plugin.kafka.SubscribeMethodInterceptorTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.089 s
- in
org.apache.skywalking.apm.plugin.kafka.ProducerConstructorMapInterceptorTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.721 s
- in org.apache.skywalking.apm.plugin.kafka.CallbackInterceptorTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.088 s
- in org.apache.skywalking.apm.plugin.kafka.SubscribeMethodInterceptorTest
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]
KafkaConsumerInterceptorTest.testConsumerWithMessage:134->assertConsumerSpan:141
Expected: is "localhost:9092;localhost:19092"
but: was "test;test-1"
[INFO]
[ERROR] Tests run: 16, Failures: 1, Errors: 0, Skipped: 0
[INFO] apache-skywalking-apm-es7 .......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14:18 min
[INFO] Finished at: 2021-10-28T12:00:44+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.22.0:test (default-test) on
project apm-kafka-plugin: There are test failures.
[ERROR]
[ERROR] Please refer to
D:\apm20-dev\skywalking-huawei-BPIT-RTService-apm20-8.7.0\skywalking-huawei-BPIT-RTService-apm20-8.7.0\apm-sniffer\apm-sdk-plugin\kafka-plugin\target\surefire-reports
for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump,
[date].dumpstream and [date]-jvmRun[N].dumpstream.
[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 <args> -rf :apm-kafka-plugin