You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "AlbumenJ (via GitHub)" <gi...@apache.org> on 2023/04/11 01:33:12 UTC
[GitHub] [dubbo] AlbumenJ commented on a diff in pull request #11677: feat: generic timeout
AlbumenJ commented on code in PR #11677:
URL: https://github.com/apache/dubbo/pull/11677#discussion_r1162213386
##########
dubbo-common/src/test/java/org/apache/dubbo/config/AbstractInterfaceConfigTest.java:
##########
@@ -236,7 +236,20 @@ void testScope() {
Assertions.assertEquals("scope", interfaceConfig.getScope());
}
+ @Test
+ void testVerifyMethod() {
+ InterfaceConfig interfaceConfig = new InterfaceConfig();
+ MethodConfig methodConfig = new MethodConfig();
+ methodConfig.setTimeout(5000);
+ methodConfig.setName("sayHello");
+ Class<?> clazz = Greeting.class;
+ boolean verifyResult = interfaceConfig.verifyMethodConfig(methodConfig, clazz, false);
+ Assertions.assertEquals(true, verifyResult);
+ boolean verifyResult2 = interfaceConfig.verifyMethodConfig(methodConfig, clazz, true);
+ Assertions.assertEquals(false, verifyResult2);
Review Comment:
```suggestion
Assertions.assertFalse(verifyResult2);
```
##########
dubbo-common/src/test/java/org/apache/dubbo/config/AbstractInterfaceConfigTest.java:
##########
@@ -236,7 +236,20 @@ void testScope() {
Assertions.assertEquals("scope", interfaceConfig.getScope());
}
+ @Test
+ void testVerifyMethod() {
+ InterfaceConfig interfaceConfig = new InterfaceConfig();
+ MethodConfig methodConfig = new MethodConfig();
+ methodConfig.setTimeout(5000);
+ methodConfig.setName("sayHello");
+ Class<?> clazz = Greeting.class;
+ boolean verifyResult = interfaceConfig.verifyMethodConfig(methodConfig, clazz, false);
+ Assertions.assertEquals(true, verifyResult);
Review Comment:
```suggestion
Assertions.assertTrue(verifyResult);
```
##########
dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/MethodConfigTest.java:
##########
@@ -431,7 +431,6 @@ void testVerifyMethodConfigOfService() {
.application("demo-app")
.service(serviceConfig)
.initialize();
- Assertions.fail("Method config verification should failed");
Review Comment:
Revert this. Safe barrier
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org