mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 02:14:54 +00:00
[TEST] fix possible NPE in ClientYamlTestExecutionContext
This commit is contained in:
parent
724e8ec39c
commit
825b80f2a6
@ -75,8 +75,10 @@ public class ClientYamlTestExecutionContext {
|
||||
response = e.getRestTestResponse();
|
||||
throw e;
|
||||
} finally {
|
||||
// if we hit a bad exception the response is null
|
||||
Object repsponseBody = response != null ? response.getBody() : null;
|
||||
//we always stash the last response body
|
||||
stash.stashValue("body", response.getBody());
|
||||
stash.stashValue("body", repsponseBody);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user