File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -224,10 +224,10 @@ private static StatusRuntimeException toStatusRuntimeException(Throwable t) {
224224 // If we have an embedded status, use it and replace the cause
225225 if (cause instanceof StatusException ) {
226226 StatusException se = (StatusException ) cause ;
227- return new StatusRuntimeException (se .getStatus (). withCause ( t ) , se .getTrailers ());
227+ return new StatusRuntimeException (se .getStatus (), se .getTrailers ());
228228 } else if (cause instanceof StatusRuntimeException ) {
229229 StatusRuntimeException se = (StatusRuntimeException ) cause ;
230- return new StatusRuntimeException (se .getStatus (). withCause ( t ) , se .getTrailers ());
230+ return new StatusRuntimeException (se .getStatus (), se .getTrailers ());
231231 }
232232 cause = cause .getCause ();
233233 }
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ public Void answer(InvocationOnMock in) throws Throwable {
139139 @ Test
140140 public void unaryBlockingCallFailed () throws Exception {
141141 Integer req = 2 ;
142- final Status status = Status .INTERNAL ;
142+ final Status status = Status .INTERNAL . withDescription ( "Unique status" ) ;
143143 final Metadata trailers = new Metadata ();
144144
145145 doAnswer (new Answer <Void >() {
@@ -156,7 +156,7 @@ public Void answer(InvocationOnMock in) throws Throwable {
156156 ClientCalls .blockingUnaryCall (call , req );
157157 fail ("Should fail" );
158158 } catch (StatusRuntimeException e ) {
159- assertSame (status . getCode () , e .getStatus (). getCode ());
159+ assertSame (status , e .getStatus ());
160160 assertSame (trailers , e .getTrailers ());
161161 }
162162 }
You can’t perform that action at this time.
0 commit comments