public void Dispose() { if (Client != null) { Client.MarkAsClosed(); Client = null; } if (Pool != null) { Pool.Close(); Pool = null; } CassandraRunner.Stop(); CassandraRunner.CleanData(); }
public HectorSharpFixture() { CassandraRunner.CleanData(); CassandraRunner.Start(); Pool = new CassandraClientPoolFactory().Create(); Client = new KeyedCassandraClientFactory(Pool, new KeyedCassandraClientFactory.Config { Timeout = 10 }) .Make(new Endpoint("localhost", 9060)); Keyspace = Client.GetKeyspace("Keyspace1", ConsistencyLevel.ONE, new FailoverPolicy(0) { Strategy = FailoverStrategy.FAIL_FAST }); }