Skip to content

Commit

Permalink
add more tests
Browse files Browse the repository at this point in the history
Signed-off-by: Dhrubo Saha <[email protected]>
  • Loading branch information
dhrubo-os committed Oct 3, 2023
1 parent a9c1ec8 commit f99a063
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ public void testSerializationDeserialization() throws IOException {
assertEquals(failureCount, parsedMLActionStats.getActionStat(ML_ACTION_FAILURE_COUNT));
}

public void testEmptySerializationDeserialization() throws IOException {

Map<ActionName, MLActionStats> modelStats = new HashMap<>();
MLModelStats mlModelEmptyStats = new MLModelStats(modelStats);
BytesStreamOutput output = new BytesStreamOutput();
mlModelEmptyStats.writeTo(output);
assertEquals(0, output.bytes().length());
}

public void testToXContent() throws IOException {
XContentBuilder builder = XContentBuilder.builder(XContentType.JSON.xContent());
builder.startObject();
Expand Down

0 comments on commit f99a063

Please sign in to comment.