Skip to content

Commit

Permalink
Use sudo: false in travis for great good
Browse files Browse the repository at this point in the history
  • Loading branch information
Zariel committed Mar 19, 2015
1 parent af32d99 commit 73de910
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
18 changes: 8 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
language: go

sudo: false

matrix:
fast_finish: true

env:
- CASS=1.2.19
- CASS=2.0.12
- CASS=2.1.2
- CASS=1.2.19
- CASS=2.0.12
- CASS=2.1.2

go:
- 1.3
- 1.4

before_install:
- sudo apt-get update

install:
- sudo apt-get install -y libjna-java python-pip
- sudo pip install cql PyYAML six
- pip install --user cql PyYAML six
- go get golang.org/x/tools/cmd/vet
- go get golang.org/x/tools/cmd/cover
- git clone https://github.com/pcmanus/ccm.git
- pushd ccm
- sudo ./setup.py install
- ./setup.py install --user
- popd
- go get .

script:
- set -e
- go test -v -tags unit
- bash -x integration.sh $CASS
- PATH=$PATH:$HOME/.local/bin bash -x integration.sh $CASS
- go vet .

notifications:
Expand Down
7 changes: 4 additions & 3 deletions integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ function run_tests() {
local version=$1

ccm create test -v binary:$version -n $clusterSize -d --vnodes

sed -i '/#MAX_HEAP_SIZE/c\MAX_HEAP_SIZE="256M"' ~/.ccm/repository/$version/conf/cassandra-env.sh
sed -i '/#HEAP_NEWSIZE/c\HEAP_NEWSIZE="100M"' ~/.ccm/repository/$version/conf/cassandra-env.sh

ccm updateconf 'client_encryption_options.enabled: true' 'client_encryption_options.keystore: testdata/pki/.keystore' 'client_encryption_options.keystore_password: cassandra' 'client_encryption_options.require_client_auth: true' 'client_encryption_options.truststore: testdata/pki/.truststore' 'client_encryption_options.truststore_password: cassandra' 'concurrent_reads: 2' 'concurrent_writes: 2' 'rpc_server_type: sync' 'rpc_min_threads: 2' 'rpc_max_threads: 2' 'write_request_timeout_in_ms: 5000' 'read_request_timeout_in_ms: 5000'
ccm start -v
ccm status
ccm node1 nodetool status

local proto=2
if [[ $version == 1.2.* ]]; then
proto=1
Expand All @@ -25,7 +25,7 @@ function run_tests() {

go test -timeout 5m -tags integration -cover -v -runssl -proto=$proto -rf=3 -cluster=$(ccm liveset) -clusterSize=$clusterSize -autowait=2000ms ./... | tee results.txt

if [ ${PIPESTATUS[0]} -ne 0 ]; then
if [ ${PIPESTATUS[0]} -ne 0 ]; then
echo "--- FAIL: ccm status follows:"
ccm status
ccm node1 nodetool status
Expand All @@ -43,4 +43,5 @@ function run_tests() {
fi
ccm clear
}

run_tests $1

0 comments on commit 73de910

Please sign in to comment.