Search in sources :

Example 1 with TimeLockDialogueServiceProvider

use of com.palantir.timelock.paxos.TimeLockDialogueServiceProvider in project atlasdb by palantir.

the class PaxosRemoteClientsTest method setUp.

@Before
public void setUp() {
    paxosInstallConfiguration = PaxosInstallConfiguration.builder().isNewService(false).dataDirectory(temporaryFolder.getRoot()).sqlitePersistence(SqlitePaxosPersistenceConfigurations.DEFAULT).leaderMode(PaxosInstallConfiguration.PaxosLeaderMode.SINGLE_LEADER).build();
    installConfiguration = TimeLockInstallConfiguration.builder().paxos(// Normally awful, but too onerous to set up
    paxosInstallConfiguration).timestampBoundPersistence(ImmutablePaxosTsBoundPersisterConfiguration.builder().build()).build();
    TimeLockDialogueServiceProvider dialogueServiceProvider = mock(TimeLockDialogueServiceProvider.class);
    when(dialogueServiceProvider.createSingleNodeInstrumentedProxy(anyString(), any(), anyBoolean())).thenAnswer(invocation -> mock(invocation.getArgument(1)));
    context = ImmutableTimelockPaxosInstallationContext.builder().install(installConfiguration).cluster(ImmutableDefaultClusterConfiguration.builder().localServer("a:1").cluster(PartialServiceConfiguration.of(ImmutableList.of("a:1", "b:2", "c:3"), Optional.empty())).build()).dialogueServiceProvider(dialogueServiceProvider).userAgent(UserAgent.of(UserAgent.Agent.of("aaa", "1.2.3"))).timeLockVersion(OrderableSlsVersion.valueOf("0.0.0")).build();
}
Also used : TimeLockDialogueServiceProvider(com.palantir.timelock.paxos.TimeLockDialogueServiceProvider) Before(org.junit.Before)

Aggregations

TimeLockDialogueServiceProvider (com.palantir.timelock.paxos.TimeLockDialogueServiceProvider)1 Before (org.junit.Before)1