.compareTo(ProtocolVersion.V5) >= 0) { assertThat(e.getFailuresMap()).hasSize(1).containsValue(0); } else { assertThat(e.getFailuresMap()).isEmpty();
.compareTo(ProtocolVersion.V5) >= 0) { assertThat(e.getFailuresMap()).hasSize(1).containsValue(1); } else { assertThat(e.getFailuresMap()).isEmpty();
public void validatePrepared(boolean expectAll) { // Prepare the statement String query = "select sansa_stark from the_known_world"; PreparedStatement statement = session.prepare(query); assertThat(cluster.manager.preparedQueries).containsValue(statement); // Ensure prepared properly based on expectation. List<PreparedStatementPreparation> preparationOne = scassandra.node(1).activityClient().retrievePreparedStatementPreparations(); List<PreparedStatementPreparation> preparationTwo = scassandra.node(2).activityClient().retrievePreparedStatementPreparations(); List<PreparedStatementPreparation> preparationThree = scassandra.node(3).activityClient().retrievePreparedStatementPreparations(); assertThat(preparationOne).hasSize(1); assertThat(preparationOne.get(0).getPreparedStatementText()).isEqualTo(query); if (expectAll) { assertThat(preparationTwo).hasSize(1); assertThat(preparationTwo.get(0).getPreparedStatementText()).isEqualTo(query); assertThat(preparationThree).hasSize(1); assertThat(preparationThree.get(0).getPreparedStatementText()).isEqualTo(query); } else { assertThat(preparationTwo).isEmpty(); assertThat(preparationThree).isEmpty(); } }
.compareTo(ProtocolVersion.V5) >= 0) { assertThat(e.getFailuresMap()).hasSize(1).containsValue(0); } else { assertThat(e.getFailuresMap()).isEmpty();
.compareTo(ProtocolVersion.V5) >= 0) { assertThat(e.getFailuresMap()).hasSize(1).containsValue(1); } else { assertThat(e.getFailuresMap()).isEmpty();
assertThat(info.renamed) .hasSize(1) .containsValue(dummerPath);
assertThat(info.renamed) .hasSize(1) .containsValue(dummerPath);
public void validatePrepared(boolean expectAll) { // Prepare the statement String query = "select sansa_stark from the_known_world"; PreparedStatement statement = session.prepare(query); assertThat(cluster.manager.preparedQueries).containsValue(statement); // Ensure prepared properly based on expectation. List<PreparedStatementPreparation> preparationOne = scassandra.node(1).activityClient().retrievePreparedStatementPreparations(); List<PreparedStatementPreparation> preparationTwo = scassandra.node(2).activityClient().retrievePreparedStatementPreparations(); List<PreparedStatementPreparation> preparationThree = scassandra.node(3).activityClient().retrievePreparedStatementPreparations(); assertThat(preparationOne).hasSize(1); assertThat(preparationOne.get(0).getPreparedStatementText()).isEqualTo(query); if (expectAll) { assertThat(preparationTwo).hasSize(1); assertThat(preparationTwo.get(0).getPreparedStatementText()).isEqualTo(query); assertThat(preparationThree).hasSize(1); assertThat(preparationThree.get(0).getPreparedStatementText()).isEqualTo(query); } else { assertThat(preparationTwo).isEmpty(); assertThat(preparationThree).isEmpty(); } }