use of io.pravega.client.stream.impl.ReaderGroupState.ReaderGroupUpdateSerializer in project pravega by pravega.
the class SerializationTest method testReaderGroupUpdates.
@Test
public void testReaderGroupUpdates() throws Exception {
ReaderGroupUpdateSerializer serializer = new ReaderGroupUpdateSerializer();
verify(serializer, new AddReader(createString()));
verify(serializer, new RemoveReader(createString(), createSegmentToLongMap()));
verify(serializer, new ReleaseSegment(createString(), createSegment(), r.nextLong()));
verify(serializer, new AcquireSegment(createString(), createSegment()));
verify(serializer, new UpdateDistanceToTail(createString(), r.nextLong(), createSegmentRangeMap()));
verify(serializer, new SegmentCompleted(createString(), createSegmentWithRange(), createMap(this::createSegmentWithRange, this::createLongList)));
verify(serializer, new CheckpointReader(createString(), createString(), createSegmentToLongMap()));
verify(serializer, new CreateCheckpoint(createString()));
verify(serializer, new ClearCheckpointsBefore(createString()));
verify(serializer, new UpdatingConfig(r.nextBoolean()));
}
Aggregations