Skip to content

Commit a250bef

Browse files
committed
make the failure message of the unit test for issue 2218 more detailed
1 parent c7ab201 commit a250bef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/telnet/InvokerTelnetHandlerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ public void testInvokeByPassingNullValue() throws RemotingException {
8686
// pass null value to parameter of primitive type
8787
try {
8888
invoke.telnet(mockChannel, "DemoService.add(null, 2)");
89-
fail("It should cause a NullPointerException here.");
89+
fail("It should cause a NullPointerException by the above code.");
9090
} catch (NullPointerException ex) {
9191
String message = ex.getMessage();
9292
assertEquals("The type of No.1 parameter is primitive(int), but the value passed is null.", message);
9393
}
9494

9595
try {
9696
invoke.telnet(mockChannel, "DemoService.add(1, null)");
97-
fail("It should cause a NullPointerException here.");
97+
fail("It should cause a NullPointerException by above code.");
9898
} catch (NullPointerException ex) {
9999
String message = ex.getMessage();
100100
assertEquals("The type of No.2 parameter is primitive(long), but the value passed is null.", message);
@@ -104,7 +104,7 @@ public void testInvokeByPassingNullValue() throws RemotingException {
104104
try {
105105
invoke.telnet(mockChannel, "DemoService.sayHello(null)");
106106
} catch (NullPointerException ex) {
107-
fail("It shouldn't cause a NullPointerException here.");
107+
fail("It shouldn't cause a NullPointerException by the above code.");
108108
}
109109
}
110110

0 commit comments

Comments
 (0)