Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mock use default/true only load the first interface. #8516

Closed
2 tasks done
changfubai opened this issue Aug 16, 2021 · 2 comments
Closed
2 tasks done

mock use default/true only load the first interface. #8516

changfubai opened this issue Aug 16, 2021 · 2 comments

Comments

@changfubai
Copy link
Contributor

changfubai commented Aug 16, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.8
  • Operating System version: mac
  • Java version: 1.8

Steps to reproduce this issue

  1. create two interface
  • com.person.dubbo.ServiceA
    • String methodA();
  • com.person.dubbo.ServiceB
    • String methodB();
  1. create two mock class in same package:
  • com.person.dubbo.ServiceAMock
  • com.person.dubbo.ServiceBMock
  1. add properties in app.
  • dubbo.reference.com.person.dubbo.ServiceA.mock=force:true
  • dubbo.reference.com.person.dubbo.ServiceB.mock=force:true
  1. invoke ServiceA and ServiceB in app. (invoke ServiceA first)
@DubboReference
private ServiceA serviceA;
@DubboReference
private ServiceA serviceB;

serviceA.methodA();
serviceB.methodB();

6、occur exception:
org.apache.dubbo.common.bytecode.NoSuchMethodException: Not found method "methodB" in class com.person.dubbo.ServiceAMock.

Expected Result

invoke methodB successfully.

Actual Result

occur exception.

What actually happens?

image

I will fix it later.

@changfubai
Copy link
Contributor Author

have been submitted into master and 3.0 branch, I will check it in 2.6.x and 2.5.x branch.

@changfubai
Copy link
Contributor Author

fixed on all branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant