Skip to content

Commit

Permalink
fix test (#539)
Browse files Browse the repository at this point in the history
  • Loading branch information
wcy666103 authored Oct 22, 2024
1 parent 7bb7234 commit 0095abd
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void testEx() {
invoker4.invokeThrowEx();
Throwable exception = clusterInvoker.invoke(invocation).getException();
assertInstanceOf(RpcException.class, exception);
assertTrue(exception.getMessage().contains("java.lang.NullPointerException"));
assertTrue(exception.getMessage().contains("throwEx is true"));
assertTrue(invoker1.isInvoked());
assertTrue(invoker2.isInvoked());
assertTrue(invoker3.isInvoked());
Expand All @@ -106,7 +106,7 @@ void testFailByOneInvoker() {
invoker1.invokeThrowEx();
Throwable exception = clusterInvoker.invoke(invocation).getException();
assertInstanceOf(RpcException.class, exception);
assertTrue(exception.getMessage().contains("java.lang.NullPointerException"));
assertTrue(exception.getMessage().contains("throwEx is true"));
}

@Test
Expand Down Expand Up @@ -146,8 +146,8 @@ public Class<DemoService> getInterface() {
public Result invoke(Invocation invocation) throws RpcException {
invoked = true;
if (throwEx) {
throwEx = false;
throw new RpcException();
// throwEx = false;
throw new RpcException("throwEx is true");
}
return new AppResponse("sucess");
}
Expand Down

0 comments on commit 0095abd

Please sign in to comment.