use of com.alibaba.graphscope.groot.coordinator.IngestorSnapshotClient in project GraphScope by alibaba.
the class IngestorWriteSnapshotIdNotifierTest method testNotifier.
@Test
void testNotifier() {
Configs configs = Configs.newBuilder().put(CommonConfig.INGESTOR_NODE_COUNT.getKey(), "1").build();
RoleClients<IngestorSnapshotClient> roleClients = mock(RoleClients.class);
IngestorSnapshotClient ingestorSnapshotClient = mock(IngestorSnapshotClient.class);
when(roleClients.getClient(0)).thenReturn(ingestorSnapshotClient);
IngestorWriteSnapshotIdNotifier notifier = new IngestorWriteSnapshotIdNotifier(configs, roleClients);
notifier.notifyWriteSnapshotIdChanged(10L);
verify(ingestorSnapshotClient).advanceIngestSnapshotId(eq(10L), any());
}
Aggregations