Skip to content

Commit

Permalink
chore(ci) repeat tests three times
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultcha committed Jan 16, 2016
1 parent 1fac3c9 commit 013f3f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .ci/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

if [ "$OPENRESTY_TESTS" != "yes" ]; then
make lint
busted -v --coverage -o gtest
busted -v --coverage -o gtest --repeat 3
luacov-coveralls -i cassandra
else
prove -l t
Expand Down
4 changes: 2 additions & 2 deletions spec/integration/cassandra_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe("spawn_session()", function()
describe("execute()", function()
after_each(function()
-- drop keyspace in case tests failed
session:execute("DROP KEYSPACE resty_cassandra_spec")
spec_utils.drop_keyspace(session, "resty_cassandra_spec")
end)
it("should require argument #1 to be a string", function()
assert.has_error(function()
Expand Down Expand Up @@ -221,7 +221,7 @@ describe("spawn_session()", function()
assert.falsy(err)

_, err = session:execute [[
CREATE TABLE resty_cassandra_spec.fixture_table(
CREATE TABLE IF NOT EXISTS resty_cassandra_spec.fixture_table(
id uuid PRIMARY KEY,
value varchar
)
Expand Down
6 changes: 1 addition & 5 deletions spec/spec_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ function _M.create_keyspace(session, keyspace)
end

function _M.drop_keyspace(session, keyspace)
local res, err = session:execute("DROP KEYSPACE "..keyspace)
if err then
error(err)
end
return res
session:execute("DROP KEYSPACE "..keyspace)
end

local delta = 0.0000001
Expand Down

0 comments on commit 013f3f5

Please sign in to comment.