@Test void getShouldRecoverFromTemporaryOutage() { cassandraExtension.pause(); try { Mono.delay(Duration.ofMillis(200)) .then(Mono.fromRunnable(cassandraExtension::unpause)) .subscribeOn(Schedulers.elastic()) .subscribe(); assertThatCode(() -> new ResilientClusterProvider(cassandraExtension.clusterConfiguration().build(), CassandraConsistenciesConfiguration.DEFAULT) .get()) .doesNotThrowAnyException(); } finally { cassandraExtension.unpause(); } }
@Override public Cluster get() { return cluster; }
ResilientClusterProvider implements Provider<Cluster> { @Override public Cluster get() { return cluster; } }
ResilientClusterProvider implements Provider<Cluster> { @Override public Cluster get() { return cluster; } @VisibleForTesting @Inject  ResilientClusterProvider(ClusterConfiguration configuration, CassandraConsistenciesConfiguration consistenciesConfiguration); }
ResilientClusterProvider implements Provider<Cluster> { @Override public Cluster get() { return cluster; } @VisibleForTesting @Inject  ResilientClusterProvider(ClusterConfiguration configuration, CassandraConsistenciesConfiguration consistenciesConfiguration); @Override Cluster get(); @PreDestroy void stop(); }
ResilientClusterProvider implements Provider<Cluster> { @Override public Cluster get() { return cluster; } @VisibleForTesting @Inject  ResilientClusterProvider(ClusterConfiguration configuration, CassandraConsistenciesConfiguration consistenciesConfiguration); @Override Cluster get(); @PreDestroy void stop();  }