Skip to content

com.alibaba.dubbo.rpc.protocol.hessian.HessianProtocolTest fails occasionally #1667

Closed

Description

@beiwei30

@htynkn mentions in mailing list:

For now, I can only reproduce this issue in travis ci with jdk9 (refer to logs: https://api.travis-ci.org/v3/job/365133362/log.txt). I also did some test with my own machine:

Mac 10.13.2 with Jdk7, Jdk8 and Jdk9 can't reproduce this issue
Window 8 with jdk8 can reproduce this issue, I run test 1000 times, 247 of them are fail.

The only thing I can think about is hessian.overload.method config for hessian protocol. After I set this value to true in test. I can't reproduce this issue both in travis ci(refer to https://api.travis-ci.org/v3/job/365152345/log.txt) and my own machine.

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Picked up _JAVA_OPTIONS: -Xmx2048m -Xms512m
Running com.alibaba.dubbo.rpc.protocol.hessian.HessianProtocolTest
log4j:WARN No appenders could be found for logger (com.alibaba.dubbo.common.logger.LoggerFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by javassist.ClassPool (file:/home/travis/.m2/repository/org/javassist/javassist/3.20.0-GA/javassist-3.20.0-GA.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of javassist.ClassPool
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2018-04-11 14:04:17.687:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
2018-04-11 14:04:17.860:INFO::jetty-6.1.x
2018-04-11 14:04:18.121:INFO::Started [email protected]:5342
2018-04-11 14:04:19.094:WARN::/com.alibaba.dubbo.rpc.protocol.hessian.HessianService: com.caucho.hessian.io.HessianProtocolException: sayHello: expected int at 0x7a (z)
2018-04-11 14:04:19.189:WARN::/com.alibaba.dubbo.rpc.protocol.hessian.HessianService: com.caucho.hessian.io.HessianProtocolException: sayHello: expected int at 0x7a (z)
Tests run: 5, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 2.609 sec <<< FAILURE! - in com.alibaba.dubbo.rpc.protocol.hessian.HessianProtocolTest
testHttpClient(com.alibaba.dubbo.rpc.protocol.hessian.HessianProtocolTest)  Time elapsed: 0.662 sec  <<< ERROR!
com.caucho.hessian.client.HessianRuntimeException: com.caucho.hessian.io.HessianProtocolException: 'ï¿¿' is an unknown code
	at com.alibaba.dubbo.rpc.protocol.hessian.HessianProtocolTest.testHttpClient(HessianProtocolTest.java:83)
Caused by: com.caucho.hessian.io.HessianProtocolException: 'ï¿¿' is an unknown code
	at com.alibaba.dubbo.rpc.protocol.hessian.HessianProtocolTest.testHttpClient(HessianProtocolTest.java:83)

testHessianProtocol(com.alibaba.dubbo.rpc.protocol.hessian.HessianProtocolTest)  Time elapsed: 0.004 sec  <<< ERROR!
com.caucho.hessian.client.HessianRuntimeException: com.caucho.hessian.io.HessianProtocolException: 'ï¿¿' is an unknown code
	at com.alibaba.dubbo.rpc.protocol.hessian.HessianProtocolTest.testHessianProtocol(HessianProtocolTest.java:48)
Caused by: com.caucho.hessian.io.HessianProtocolException: 'ï¿¿' is an unknown code
	at com.alibaba.dubbo.rpc.protocol.hessian.HessianProtocolTest.testHessianProtocol(HessianProtocolTest.java:48)


Results :

Tests in error: 
  HessianProtocolTest.testHessianProtocol:48 » HessianRuntime com.caucho.hessian...
  HessianProtocolTest.testHttpClient:83 » HessianRuntime com.caucho.hessian.io.H...

Activity

  1. ralf0131 commented on May 16, 2018

    @ralf0131
    Contributor

    @htynkn I think you are right. The two failing ut

    HessianProtocolTest.testHessianProtocol:48 » HessianRuntime com.caucho.hessian...
    HessianProtocolTest.testHttpClient:83 » HessianRuntime com.caucho.hessian.io.H...
    

    both call com.alibaba.dubbo.rpc.protocol.hessian.HessianServiceImpl#sayHello(String name), which has an override method sayHello(String name, int times).

    In the opposite, com.alibaba.dubbo.rpc.protocol.hessian.HessianProtocolTest#testOverload never fails because hessian.overload.method is set to true.

  2. added a commit that references this issue on May 17, 2018
    a45206c
  3. added a commit that references this issue on Sep 9, 2019
    06e5e67
  4. added a commit that references this issue on Sep 10, 2019
    116c9c3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions