Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added logging to executor.

  • Loading branch information...
commit ef3133451c63db0d215b628acb50cfd8c1bbbbbe 1 parent 20cb688
@jnunemaker authored
Showing with 12 additions and 2 deletions.
  1. +12 −2 spec/helper.rb
View
14 spec/helper.rb
@@ -3,19 +3,29 @@
require 'rubygems'
require 'bundler'
+require 'logger'
+require 'pathname'
Bundler.require(:default, :test)
require 'adapter/spec/an_adapter'
require 'adapter-cassanity'
+log_path = Pathname(__FILE__).join('..', '..', 'log').expand_path
+log_path.mkpath
+
+logger = Logger.new(log_path.join('test.log'))
+
COLUMN_FAMILIES = {}
cassandra_setup = lambda { |args|
host = ENV.fetch('CASSANDRA_HOST', '127.0.0.1:9160')
keyspace_name = ENV.fetch('CASSANDRA_KEYSPACE_NAME', 'adapter_cassanity')
- client = CassandraCQL::Database.new(host)
- executor = Cassanity::Executors::CassandraCql.new(client: client)
+ client = CassandraCQL::Database.new(host, cql_version: '3.0.0')
+ executor = Cassanity::Executors::CassandraCql.new({
+ client: client,
+ logger: logger,
+ })
connection = Cassanity::Connection.new(executor: executor)
keyspace = connection.keyspace(keyspace_name)
keyspace.recreate
Please sign in to comment.
Something went wrong with that request. Please try again.