Search in sources :

Example 1 with IngestorSnapshotClient

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());
}
Also used : IngestorSnapshotClient(com.alibaba.graphscope.groot.coordinator.IngestorSnapshotClient) Configs(com.alibaba.maxgraph.common.config.Configs) IngestorWriteSnapshotIdNotifier(com.alibaba.graphscope.groot.coordinator.IngestorWriteSnapshotIdNotifier) Test(org.junit.jupiter.api.Test)

Aggregations

IngestorSnapshotClient (com.alibaba.graphscope.groot.coordinator.IngestorSnapshotClient)1 IngestorWriteSnapshotIdNotifier (com.alibaba.graphscope.groot.coordinator.IngestorWriteSnapshotIdNotifier)1 Configs (com.alibaba.maxgraph.common.config.Configs)1 Test (org.junit.jupiter.api.Test)1