connectionpool_systems_test.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/bash
  2. set -e
  3. function run_tests() {
  4. local clusterSize=5
  5. local nodesShut=2
  6. local version=$1
  7. ccm remove test || true
  8. local keypath="$(pwd)/testdata/pki"
  9. local conf=(
  10. "client_encryption_options.enabled: true"
  11. "client_encryption_options.keystore: $keypath/.keystore"
  12. "client_encryption_options.keystore_password: cassandra"
  13. "client_encryption_options.require_client_auth: true"
  14. "client_encryption_options.truststore: $keypath/.truststore"
  15. "client_encryption_options.truststore_password: cassandra"
  16. "concurrent_reads: 2"
  17. "concurrent_writes: 2"
  18. "rpc_server_type: sync"
  19. "rpc_min_threads: 2"
  20. "rpc_max_threads: 2"
  21. "write_request_timeout_in_ms: 5000"
  22. "read_request_timeout_in_ms: 5000"
  23. )
  24. ccm create test -v binary:$version -n $clusterSize -d --vnodes --jvm_arg="-Xmx256m"
  25. ccm updateconf "${conf[@]}"
  26. ccm start -v
  27. ccm status
  28. ccm node1 nodetool status
  29. local proto=2
  30. if [[ $version == 1.2.* ]]; then
  31. proto=1
  32. fi
  33. go test -timeout 15m -tags conn_pool -v -runssl -proto=$proto -rf=3 -cluster=$(ccm liveset) -clusterSize=$clusterSize -nodesShut=$nodesShut ./... | tee results.txt
  34. if [ ${PIPESTATUS[0]} -ne 0 ]; then
  35. echo "--- FAIL: ccm status follows:"
  36. ccm status
  37. ccm node1 nodetool status
  38. ccm node1 showlog > status.log
  39. cat status.log
  40. echo "--- FAIL: Received a non-zero exit code from the go test execution, please investigate this"
  41. exit 1
  42. fi
  43. ccm remove
  44. }
  45. run_tests $1