use of org.apache.cassandra.io.util.FileInputStreamPlus in project cassandra by apache.
the class SerializationsTest method testValidationCompleteRead.
@Test
public void testValidationCompleteRead() throws IOException {
if (EXECUTE_WRITES)
testValidationCompleteWrite();
try (FileInputStreamPlus in = getInput("service.ValidationComplete.bin")) {
// empty validation
ValidationResponse message = ValidationResponse.serializer.deserialize(in, getVersion());
assert DESC.equals(message.desc);
assert message.success();
assert message.trees != null;
// validation with a tree
message = ValidationResponse.serializer.deserialize(in, getVersion());
assert DESC.equals(message.desc);
assert message.success();
assert message.trees != null;
// failed validation
message = ValidationResponse.serializer.deserialize(in, getVersion());
assert DESC.equals(message.desc);
assert !message.success();
assert message.trees == null;
}
}
Aggregations