Skip to content

Commit

Permalink
Fix 2.x compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <[email protected]>
  • Loading branch information
dbwiddis committed Dec 24, 2023
1 parent ed7050f commit 5771ef7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ protected SearchResponse searchWorkflowState(String query) throws Exception {
assertEquals(RestStatus.OK, TestHelpers.restStatus(restSearchResponse));

// Parse entity content into SearchResponse
MediaType mediaType = MediaType.fromMediaType(restSearchResponse.getEntity().getContentType());
MediaType mediaType = MediaType.fromMediaType(restSearchResponse.getEntity().getContentType().getValue());
try (
XContentParser parser = mediaType.xContent()
.createParser(
Expand All @@ -471,8 +471,8 @@ protected void getAndAssertWorkflowStatus(String workflowId, State stateStatus,
assertEquals(RestStatus.OK, TestHelpers.restStatus(response));

Map<String, Object> responseMap = entityAsMap(response);
assertEquals(stateStatus.name(), (String) responseMap.get(CommonValue.STATE_FIELD));
assertEquals(provisioningStatus.name(), (String) responseMap.get(CommonValue.PROVISIONING_PROGRESS_FIELD));
assertEquals(stateStatus.name(), responseMap.get(CommonValue.STATE_FIELD));
assertEquals(provisioningStatus.name(), responseMap.get(CommonValue.PROVISIONING_PROGRESS_FIELD));

}

Expand Down

0 comments on commit 5771ef7

Please sign in to comment.