Search in sources :

Example 1 with LoadBalancingPlugin

use of org.neo4j.causalclustering.load_balancing.LoadBalancingPlugin in project neo4j by neo4j.

the class GetServersProcedureV2Test method shouldPassClientContextToPlugin.

@Test
public void shouldPassClientContextToPlugin() throws Exception {
    // given
    LoadBalancingPlugin plugin = mock(LoadBalancingPlugin.class);
    when(plugin.run(anyMap())).thenReturn(mock(LoadBalancingPlugin.Result.class));
    GetServersProcedureForMultiDC getServers = new GetServersProcedureForMultiDC(plugin);
    Map<String, String> clientContext = stringMap("key", "value", "key2", "value2");
    // when
    getServers.apply(null, new Object[] { clientContext });
    // then
    verify(plugin).run(clientContext);
}
Also used : LoadBalancingPlugin(org.neo4j.causalclustering.load_balancing.LoadBalancingPlugin) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 LoadBalancingPlugin (org.neo4j.causalclustering.load_balancing.LoadBalancingPlugin)1