Skip to content

Commit

Permalink
Remove unused code and improve assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Feb 11, 2025
1 parent b07217a commit 124b384
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,10 @@ void startCallableProcessingDisconnectedClient() throws Exception {
AsyncEvent event = new AsyncEvent(new MockAsyncContext(this.servletRequest, this.servletResponse), ex);
this.asyncWebRequest.onError(event);

MockAsyncContext asyncContext = (MockAsyncContext) this.servletRequest.getAsyncContext();
assertThat(this.asyncManager.hasConcurrentResult()).isTrue();
assertThat(this.asyncManager.getConcurrentResult())
.as("Disconnected client error not wrapped AsyncRequestNotUsableException")
.isOfAnyClassIn(AsyncRequestNotUsableException.class);
.as("Disconnected client error not wrapped in AsyncRequestNotUsableException")
.isExactlyInstanceOf(AsyncRequestNotUsableException.class);
}

@Test
Expand Down Expand Up @@ -287,8 +286,8 @@ void startDeferredResultProcessingDisconnectedClient() throws Exception {

assertThat(this.asyncManager.hasConcurrentResult()).isTrue();
assertThat(deferredResult.getResult())
.as("Disconnected client error not wrapped AsyncRequestNotUsableException")
.isOfAnyClassIn(AsyncRequestNotUsableException.class);
.as("Disconnected client error not wrapped in AsyncRequestNotUsableException")
.isExactlyInstanceOf(AsyncRequestNotUsableException.class);
}


Expand Down

0 comments on commit 124b384

Please sign in to comment.