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

[Dubbo-2298] Add Annotation-Driven for MethodConfig and ArgumentConfig #2603

Merged
merged 14 commits into from
Feb 25, 2019
Prev Previous commit
Next Next commit
merge 2.6.x
  • Loading branch information
cvictory committed Nov 2, 2018
commit 67fb98cfb7a78700944c125f17890e79a04b77ed
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,45 @@ private class InnerTest {

}

/**
* unit test for dubbo-1765
*/
@Test
public void testReferenceRetry() {
ApplicationConfig application = new ApplicationConfig();
application.setName("test-reference-retry");
RegistryConfig registry = new RegistryConfig();
registry.setAddress("multicast://224.5.6.7:1234");
ProtocolConfig protocol = new ProtocolConfig();
protocol.setName("dubbo");
ReferenceConfig<DemoService> rc = new ReferenceConfig<DemoService>();
rc.setApplication(application);
rc.setRegistry(registry);
rc.setInterface(DemoService.class.getName());
boolean success = false;
DemoService demoService = null;
try {
demoService = rc.get();
success = true;
} catch (Exception e) {
e.printStackTrace();
}
Assert.assertFalse(success);
Assert.assertNull(demoService);
ServiceConfig<DemoService> sc = new ServiceConfig<DemoService>();
sc.setInterface(DemoService.class);
sc.setRef(new DemoServiceImpl());
sc.setApplication(application);
sc.setRegistry(registry);
sc.setProtocol(protocol);
try {
sc.export();
demoService = rc.get();
success = true;
} catch (Exception e) {
e.printStackTrace();
}
Assert.assertTrue(success);
Assert.assertNotNull(demoService);
}
}
You are viewing a condensed version of this merge commit. You can view the full changes here.