Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Bogan <[email protected]>
  • Loading branch information
ryanbogan committed Jan 3, 2024
1 parent 00b6f34 commit ee7f7c5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void testXContent() throws IOException {
GetModelResponse getModelResponse = new GetModelResponse(model);
String expectedResponseString =
"{\"model_id\":\"test-model\",\"model_blob\":\"aGVsbG8=\",\"state\":\"created\",\"timestamp\":\"2021-03-27 10:15:30 AM +05:30\",\"description\":\"test model\",\"error\":\"\",\"space_type\":\"l2\",\"dimension\":4,\"engine\":\"nmslib\",\"training_node_assignment\":\"\"}";
XContentBuilder xContentBuilder = XContentFactory.jsonBuilder();
XContentBuilder xContentBuilder = MediaTypeRegistry.contentBuilder(XContentType.JSON);
getModelResponse.toXContent(xContentBuilder, null);
assertEquals(expectedResponseString, xContentBuilder.toString());
}
Expand All @@ -73,7 +73,7 @@ public void testXContentWithNoModelBlob() throws IOException {
GetModelResponse getModelResponse = new GetModelResponse(model);
String expectedResponseString =
"{\"model_id\":\"test-model\",\"model_blob\":\"\",\"state\":\"failed\",\"timestamp\":\"2021-03-27 10:15:30 AM +05:30\",\"description\":\"test model\",\"error\":\"\",\"space_type\":\"l2\",\"dimension\":4,\"engine\":\"nmslib\",\"training_node_assignment\":\"\"}";
XContentBuilder xContentBuilder = XContentFactory.jsonBuilder();
XContentBuilder xContentBuilder = MediaTypeRegistry.contentBuilder(XContentType.JSON);
getModelResponse.toXContent(xContentBuilder, null);
assertEquals(expectedResponseString, xContentBuilder.toString());
}
Expand Down

0 comments on commit ee7f7c5

Please sign in to comment.