public void Consistency_PreparedStatement_Serial_Select_Success() { SetupSessionAndCluster(_defaultNodeCountOne); PreparedStatement preparedSelectStatement = _session.Prepare(_defaultSelectStatement); BoundStatement statement = preparedSelectStatement.SetConsistencyLevel(ConsistencyLevel.Quorum).Bind(); statement.SetSerialConsistencyLevel(ConsistencyLevel.Serial); var result = _session.Execute(statement); Assert.AreEqual(ConsistencyLevel.Quorum, result.Info.AchievedConsistency); Assert.AreEqual(_defaultPocoList.Count, result.GetRows().ToList().Count); }
public void Consistency_PreparedStatement_Serial_Insert_Success() { ManyDataTypesEntity mdtp = ManyDataTypesEntity.GetRandomInstance(); object[] vals = ConvertEntityToObjectArray(mdtp); SetupSessionAndCluster(_defaultNodeCountOne); PreparedStatement preparedInsertStatement = _session.Prepare(_preparedInsertStatementAsString); BoundStatement boundStatement = preparedInsertStatement.SetConsistencyLevel(ConsistencyLevel.Quorum).Bind(vals); boundStatement.SetSerialConsistencyLevel(ConsistencyLevel.Serial); var result = _session.Execute(boundStatement); Assert.AreEqual(ConsistencyLevel.Quorum, result.Info.AchievedConsistency); var selectResult = _session.Execute(_defaultSelectStatement); Assert.AreEqual(_defaultPocoList.Count + 1, selectResult.GetRows().ToList().Count); }