Skip to content

Commit

Permalink
chore(ci) test under C* 3.9 and use dev lua-cassandra
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultcha committed Oct 18, 2016
1 parent e9b9613 commit 3dc9a0e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .ci/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export PATH=$PATH:$OPENRESTY_INSTALL/nginx/sbin:$OPENRESTY_INSTALL/bin:$LUAROCKS

eval `luarocks path`

luarocks purge --tree=$LUAROCKS_INSTALL

# -------------------------------------
# Install ccm & setup Cassandra cluster
# -------------------------------------
Expand Down
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
sudo: false

language: c
language: java

compiler:
- gcc
jdk:
- oraclejdk8

notifications:
email: false
Expand All @@ -22,7 +22,7 @@ env:
- SERF=0.7.0
- LUAROCKS=2.4.0
- OPENSSL=1.0.2h
- CASSANDRA=2.2.7
- CASSANDRA=2.2.8
- OPENRESTY_BASE=1.9.15.1
- OPENRESTY_LATEST=1.11.2.1
- OPENRESTY=$OPENRESTY_BASE
Expand All @@ -37,8 +37,10 @@ env:
OPENRESTY=$OPENRESTY_BASE
- TEST_SUITE=integration
OPENRESTY=$OPENRESTY_LATEST
CASSANDRA=3.9
- TEST_SUITE=plugins
OPENRESTY=$OPENRESTY_LATEST
CASSANDRA=3.9

before_install:
- source .ci/setup_env.sh
Expand Down
2 changes: 1 addition & 1 deletion kong-0.9.3-0.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies = {
"multipart == 0.4",
"version == 0.2",
"lapis == 1.5.1",
"lua-cassandra == 1.0.0",
"lua-cassandra == dev-0",
"pgmoon-mashape == 2.0.1",
"luatz == 0.3",
"lua_system_constants == 0.1.1",
Expand Down
9 changes: 8 additions & 1 deletion kong/dao/db/cassandra.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,16 @@ function _M.new(kong_config)
connect_timeout = kong_config.cassandra_timeout,
read_timeout = kong_config.cassandra_timeout,
ssl = kong_config.cassandra_ssl,
verify = kong_config.cassandra_ssl_verify
verify = kong_config.cassandra_ssl_verify,
lock_timeout = 30,
silent = ngx.IS_CLI
}

if ngx.IS_CLI then
local policy = require("resty.cassandra.policies.reconnection.const")
cluster_options.reconn_policy = policy.new(100)
end

--
-- cluster options from Kong config
--
Expand Down
1 change: 1 addition & 0 deletions spec/kong_tests.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pg_host = 127.0.0.1
pg_port = 5432
pg_database = kong_tests
cassandra_keyspace = kong_tests
cassandra_timeout = 10000
anonymous_reports = off

lua_package_path = ?/init.lua;./kong/?.lua
Expand Down

0 comments on commit 3dc9a0e

Please sign in to comment.