Skip to content

Fix for issue #77 #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ let session = new Session(opts)
```

It's also possible to control the default address the session will bind to by providing
an address via the `COHERENCE_GRPC_PROXY_ADDRESS` environment variable. The format of the value would
an address via the `COHERENCE_SERVER_ADDRESS` environment variable. The format of the value would
be the same as if you configured it programmatically as the above example shows.

Once the session has been constructed, it will now be possible to create maps and caches.
Expand Down
6 changes: 3 additions & 3 deletions bin/docker-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ echo ${TYPE}

function coh_up() {
echo "Starting test containers ..."
DOCKER_REGISTRY="${REGISTRY}" COHERENCE_VERSION="${VERSION}" COHERENCE_TYPE="${TYPE}" docker-compose -f etc/docker-compose-2-members.yaml up --force-recreate --renew-anon-volumes -d
DOCKER_REGISTRY="${REGISTRY}" COHERENCE_VERSION="${VERSION}" COHERENCE_TYPE="${TYPE}" docker compose -f etc/docker-compose-2-members.yaml up --force-recreate --renew-anon-volumes -d
SECONDS=0
echo "Waiting for Coherence to be healthy (within 60s) ..."
while [ ${SECONDS} -le 60 ]; do
Expand All @@ -29,14 +29,14 @@ function coh_up() {
done
node_version=$(node -v)
filename="logs-startup-${VERSION}-${node_version}.txt"
DOCKER_REGISTRY="${REGISTRY}" COHERENCE_VERSION="${VERSION}" COHERENCE_TYPE="${TYPE}" docker-compose -f etc/docker-compose-2-members.yaml logs --no-color > "${filename}"
DOCKER_REGISTRY="${REGISTRY}" COHERENCE_VERSION="${VERSION}" COHERENCE_TYPE="${TYPE}" docker compose -f etc/docker-compose-2-members.yaml logs --no-color > "${filename}"
echo "Coherence failed to become healthy. See ${filename} for details."
coh_down
exit 1
}

function coh_down() {
DOCKER_REGISTRY="${REGISTRY}" COHERENCE_VERSION="${VERSION}" COHERENCE_TYPE="${TYPE}" docker-compose -f etc/docker-compose-2-members.yaml down -v
DOCKER_REGISTRY="${REGISTRY}" COHERENCE_VERSION="${VERSION}" COHERENCE_TYPE="${TYPE}" docker compose -f etc/docker-compose-2-members.yaml down -v
}

while getopts "ud" OPTION; do
Expand Down
2 changes: 1 addition & 1 deletion bin/test-cycle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function run_tests() {

function dump_logs() {
node_version=$(node -v)
DOCKER_REGISTRY="${REGISTRY}" COHERENCE_VERSION="${VERSION}" COHERENCE_TYPE="${TYPE}" docker-compose -f etc/docker-compose-2-members.yaml logs --no-color > logs-"${1}"-test-"${VERSION}"-"${node_version}".txt
DOCKER_REGISTRY="${REGISTRY}" COHERENCE_VERSION="${VERSION}" COHERENCE_TYPE="${TYPE}" docker compose -f etc/docker-compose-2-members.yaml logs --no-color > logs-"${1}"-test-"${VERSION}"-"${node_version}".txt
}

function cleanup() {
Expand Down
77 changes: 56 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"repository": "https://github.com/oracle/coherence-js-client",
"dependencies": {
"@grpc/proto-loader": "^0.7",
"@grpc/grpc-js": "^1.9",
"@grpc/grpc-js": "^1.11",
"google-protobuf": "^3.21",
"decimal.js": "^10.4"
},
Expand Down
9 changes: 8 additions & 1 deletion src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,16 @@ export class Options {
* Construct a new {@link Options}.
*/
constructor () {
this._address = (process.env.grpc_proxy_address || process.env.COHERENCE_GRPC_PROXY_ADDRESS)
this._address = (process.env.grpc_proxy_address ||
process.env.COHERENCE_GRPC_PROXY_ADDRESS ||
process.env.COHERENCE_SERVER_ADDRESS)
|| Session.DEFAULT_ADDRESS

if (process.env.COHERENCE_GRPC_PROXY_ADDRESS !== undefined) {
console.warn("The COHERENCE_GRPC_PROXY_ADDRESS environment variable"
+ " is deprecated. Please use COHERENCE_SERVER_ADDRESS instead.")
}

this._requestTimeoutInMillis = Session.DEFAULT_REQUEST_TIMEOUT
this._readyTimeoutInMillis = Session.DEFAULT_READY_TIMEOUT
this._format = Session.DEFAULT_FORMAT
Expand Down
Loading