Skip to content

Commit

Permalink
optimize assert in ut
Browse files Browse the repository at this point in the history
Signed-off-by: zhichao-aws <zhichaog@amazon.com>
  • Loading branch information
zhichao-aws committed Feb 27, 2024
1 parent 1ae0fe8 commit 571d4f4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ public void testProcessRequest_whenVisitingEmptyQueryBody_thenSuccess() throws E
NeuralQueryEnricherProcessor.Factory factory = new NeuralQueryEnricherProcessor.Factory();
SearchRequest searchRequest = new SearchRequest();
searchRequest.source(new SearchSourceBuilder());
assertNull(searchRequest.source().query());
NeuralQueryEnricherProcessor processor = createTestProcessor(factory);
SearchRequest processSearchRequest = processor.processRequest(searchRequest);
assert (processSearchRequest == searchRequest);
// should do nothing
assertNull(processSearchRequest.source().query());
}

public void testType() throws Exception {
Expand Down

0 comments on commit 571d4f4

Please sign in to comment.