Skip to content

Commit

Permalink
Add ClusterInstanceRegistry
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Dec 17, 2024
1 parent c728695 commit 22144c1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ void assertRenewWithInstanceOnlineEvent() {
ComputeNodeInstance computeNodeInstance = mock(ComputeNodeInstance.class);
when(contextManager.getPersistServiceFacade().getComputeNodePersistService().loadComputeNodeInstance(instanceMetaData)).thenReturn(computeNodeInstance);
subscriber.renew(new InstanceOnlineEvent(instanceMetaData));
verify(contextManager.getComputeNodeInstanceContext()).getClusterInstanceRegistry().add(computeNodeInstance);
verify(contextManager.getComputeNodeInstanceContext().getClusterInstanceRegistry()).add(computeNodeInstance);
}

@Test
void assertRenewWithInstanceOfflineEvent() {
subscriber.renew(new InstanceOfflineEvent(mock(InstanceMetaData.class)));
verify(contextManager.getComputeNodeInstanceContext()).getClusterInstanceRegistry().delete(any());
verify(contextManager.getComputeNodeInstanceContext().getClusterInstanceRegistry()).delete(any());
}

@Test
Expand Down

0 comments on commit 22144c1

Please sign in to comment.