From 60d12aefa7344997996e060a75ef0cbc376941c9 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 17 Aug 2023 10:31:46 -0700 Subject: [PATCH 1/2] - Remove long timeouts added for debugging. - Update keys.sh to function properly on OL7 - Update to gRPC 1.9.x --- bin/docker-utils.sh | 2 +- bin/keys.sh | 9 ++++++++- bin/test-cycle.sh | 1 - package-lock.json | 14 +++++++------- package.json | 2 +- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/bin/docker-utils.sh b/bin/docker-utils.sh index e95591e..08df55f 100755 --- a/bin/docker-utils.sh +++ b/bin/docker-utils.sh @@ -22,7 +22,7 @@ function coh_up() { while [ ${SECONDS} -le 60 ]; do READY=$(curl -o /dev/null -s -w "%{http_code}" "http://127.0.0.1:6676/ready") || true if [ "${READY}" -eq "200" ]; then - sleep 20 + sleep 5 echo "Coherence is ready!" return fi diff --git a/bin/keys.sh b/bin/keys.sh index 047eb80..15f7527 100755 --- a/bin/keys.sh +++ b/bin/keys.sh @@ -19,6 +19,13 @@ if [ -z "${CERTS_DIR}" ] ; then exit 1 fi +# check for location of openssl.cnf +if [ -f "/etc/ssl/openssl.cnf" ]; then + export SSL_CNF=/etc/ssl/openssl.cnf +else + export SSL_CNF=/etc/pki/tls/openssl.cnf +fi + mkdir -p "${CERTS_DIR}" # Generate random passwords for each run @@ -31,7 +38,7 @@ echo "${CAPASS}" | openssl genrsa -passout stdin -aes256 \ echo Generate Guardians CA certificate: echo "${CAPASS}" | openssl req -passin stdin -new -x509 -days 3650 \ -reqexts SAN \ - -config <(cat /etc/ssl/openssl.cnf \ + -config <(cat "${SSL_CNF}" \ <(printf "\n[SAN]\nsubjectAltName=DNS:localhost,DNS:127.0.0.1")) \ -key "${CERTS_DIR}"/guardians-ca.key \ -out "${CERTS_DIR}"/guardians-ca.crt \ diff --git a/bin/test-cycle.sh b/bin/test-cycle.sh index 758b1bb..fc81d0f 100755 --- a/bin/test-cycle.sh +++ b/bin/test-cycle.sh @@ -36,7 +36,6 @@ function run_clear() { function run_tests() { npm run compile npm run coh-up - sleep 5 timeout 3m npm exec mocha "${PWD}"/test/**.js --recursive --exit } diff --git a/package-lock.json b/package-lock.json index 0a0b7d5..687be32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.2.2-SNAPSHOT", "license": "UPL-1.0", "dependencies": { - "@grpc/grpc-js": "^1.8", + "@grpc/grpc-js": "^1.9", "@grpc/proto-loader": "^0.7", "decimal.js": "^10.4", "google-protobuf": "^3.21" @@ -443,9 +443,9 @@ } }, "node_modules/@grpc/grpc-js": { - "version": "1.8.13", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.8.13.tgz", - "integrity": "sha512-iY3jsdfbc0ARoCLFvbvUB8optgyb0r1XLPb142u+QtgBcKJYkCIFt3Fd/881KqjLYWjsBJF57N3b8Eop9NDfUA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.0.tgz", + "integrity": "sha512-H8+iZh+kCE6VR/Krj6W28Y/ZlxoZ1fOzsNt77nrdE3knkbSelW1Uus192xOFCxHyeszLj8i4APQkSIXjAoOxXg==", "dependencies": { "@grpc/proto-loader": "^0.7.0", "@types/node": ">=12.12.47" @@ -3626,9 +3626,9 @@ } }, "@grpc/grpc-js": { - "version": "1.8.13", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.8.13.tgz", - "integrity": "sha512-iY3jsdfbc0ARoCLFvbvUB8optgyb0r1XLPb142u+QtgBcKJYkCIFt3Fd/881KqjLYWjsBJF57N3b8Eop9NDfUA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.0.tgz", + "integrity": "sha512-H8+iZh+kCE6VR/Krj6W28Y/ZlxoZ1fOzsNt77nrdE3knkbSelW1Uus192xOFCxHyeszLj8i4APQkSIXjAoOxXg==", "requires": { "@grpc/proto-loader": "^0.7.0", "@types/node": ">=12.12.47" diff --git a/package.json b/package.json index 65a9db0..69aa3ba 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "repository": "https://github.com/oracle/coherence-js-client", "dependencies": { "@grpc/proto-loader": "^0.7", - "@grpc/grpc-js": "^1.8", + "@grpc/grpc-js": "^1.9", "google-protobuf": "^3.21", "decimal.js": "^10.4" }, From 45095c56e4c1d939c2a009bcea540284581d63d8 Mon Sep 17 00:00:00 2001 From: Ryan Lubke Date: Thu, 17 Aug 2023 10:43:13 -0700 Subject: [PATCH 2/2] - Remove long timeouts added for debugging. - Update keys.sh to function properly on OL7 - Update to gRPC 1.9.x --- bin/test-cycle.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/test-cycle.sh b/bin/test-cycle.sh index fc81d0f..758b1bb 100755 --- a/bin/test-cycle.sh +++ b/bin/test-cycle.sh @@ -36,6 +36,7 @@ function run_clear() { function run_tests() { npm run compile npm run coh-up + sleep 5 timeout 3m npm exec mocha "${PWD}"/test/**.js --recursive --exit }