sofastack / sofa-rpc

SOFARPC is a high-performance, high-extensibility, production-level Java RPC framework.
https://www.sofastack.tech/sofa-rpc/docs/Home
Apache License 2.0
3.83k stars 1.18k forks source link

Consul registry url converter not right. #449

Closed JervyShi closed 5 years ago

JervyShi commented 5 years ago

Describe the bug

ConsulURL#valueOf can not return right url instance.

Expected behavior

Input: bolt://127.0.0.1:12200?accepts=100000&appName=samples&delay=-1&dynamic=true&id=helloFutureServiceImpl&interface=com.alipay.sofa.rpc.samples.invoke.HelloFutureService&language=java&pid=16262&protocol=bolt&rpcVer=50500&serialization=hessian2&startTime=1545361899136&timeout=0&uniqueId=&version=1.0&weight=100

Output:

ConsulURL:
    protocol: bolt
    host: 127.0.0.1
    port: 12200
    interface: com.alipay.sofa.rpc.samples.invoke.HelloFutureService
    parameters: map...

Actual behavior

Output: ConsulURL.interface is null.

Environment

leizhiyuan commented 5 years ago

image

I wrote a test case ,it seems ok?

JervyShi commented 5 years ago

@leizhiyuan Yeah, getServiceInterface() read property value from parameters map directly, but the real properties in ConsulURL are not right. I have created a pr for this.

liangyuanpeng commented 5 years ago

Yes, there are some problems