Search in sources :

Example 1 with ClusterConfiguration

use of com.palantir.timelock.config.ClusterConfiguration in project atlasdb by palantir.

the class TimeLockAgentTest method newServiceByClusterBootstrapConfigurationFailsIfDirectoryExists.

@Test
public void newServiceByClusterBootstrapConfigurationFailsIfDirectoryExists() throws IOException {
    File mockFile = getMockFileWith(true, true);
    ClusterConfiguration differentClusterConfig = ImmutableDefaultClusterConfiguration.builder().localServer(SERVER_A).addKnownNewServers(SERVER_A).cluster(PartialServiceConfiguration.of(ImmutableList.of(SERVER_A, "b", "c"), Optional.empty())).build();
    assertThatThrownBy(() -> TimeLockAgent.verifyIsNewServiceInvariant(TimeLockInstallConfiguration.builder().paxos(PaxosInstallConfiguration.builder().dataDirectory(mockFile).isNewService(false).build()).build(), differentClusterConfig)).isInstanceOf(IllegalArgumentException.class);
}
Also used : ClusterConfiguration(com.palantir.timelock.config.ClusterConfiguration) DefaultClusterConfiguration(com.palantir.timelock.config.DefaultClusterConfiguration) ImmutableDefaultClusterConfiguration(com.palantir.timelock.config.ImmutableDefaultClusterConfiguration) File(java.io.File) Test(org.junit.Test)

Aggregations

ClusterConfiguration (com.palantir.timelock.config.ClusterConfiguration)1 DefaultClusterConfiguration (com.palantir.timelock.config.DefaultClusterConfiguration)1 ImmutableDefaultClusterConfiguration (com.palantir.timelock.config.ImmutableDefaultClusterConfiguration)1 File (java.io.File)1 Test (org.junit.Test)1