From effa230f695412187cd08562bb2eb2e8390c7305 Mon Sep 17 00:00:00 2001 From: Dominic Pelini Date: Wed, 16 Oct 2024 20:19:05 -0600 Subject: [PATCH] test fix --- .github/assets/aerospike.conf | 72 ++++++++++++++++++++++++++++ .github/workflows/build-bindings.yml | 10 +++- .github/workflows/tests.yml | 23 +++++---- 3 files changed, 93 insertions(+), 12 deletions(-) create mode 100644 .github/assets/aerospike.conf diff --git a/.github/assets/aerospike.conf b/.github/assets/aerospike.conf new file mode 100644 index 000000000..55b2c866a --- /dev/null +++ b/.github/assets/aerospike.conf @@ -0,0 +1,72 @@ +@ -1,72 +0,0 @@ +# Aerospike database configuration file +# This template sets up a single-node, single namespace developer environment. +# +# Alternatively, you can pass in your own configuration file. +# You can see more examples at +# https://github.com/aerospike/aerospike-server/tree/master/as/etc + +# This stanza must come first. +service { + feature-key-file /etc/aerospike/features.conf + cluster-name proximus +} + +logging { + + + + + + # Send log messages to stdout + console { + context any info + } +} + +network { + service { + address any + port 3000 + + # Uncomment the following to set the 'access-address' parameter to the + # IP address of the Docker host. This will the allow the server to correctly + # publish the address which applications and other nodes in the cluster to + # use when addressing this node. + # access-address + } + + heartbeat { + # mesh is used for environments that do not support multicast + mode mesh + address local + port 3002 + interval 150 + timeout 10 + } + + fabric { + # Intra-cluster communication port (migrates, replication, etc) + # default to same address in 'service' + address local + port 3001 + } + +} + +# AVS ONLY +#namespace proximus-meta { +# replication-factor 2 +#storage-engine memory { +# data-size 2G +#} +#nsup-period 100 +#} + +namespace test { + replication-factor 2 + storage-engine memory { + data-size 1G + } + allow-ttl-without-nsup true +} diff --git a/.github/workflows/build-bindings.yml b/.github/workflows/build-bindings.yml index f8b7c2c42..a0c180885 100644 --- a/.github/workflows/build-bindings.yml +++ b/.github/workflows/build-bindings.yml @@ -141,7 +141,8 @@ jobs: - name: Run Aerospike server if: ${{ !contains(github.event.pull_request.labels.*.name, 'new-server-features') }} - run: docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server + run: docker run -d -v .:./.github/assets/aerospike.conf --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server --config-file ./aerospike.conf + # - name: Set config.conf to use Docker IP address of Aerospike server # # config.conf should be copied into the cibuildwheel Docker container @@ -557,8 +558,13 @@ jobs: - name: Run Aerospike server if: ${{ !contains(github.event.pull_request.labels.*.name, 'new-server-features') }} - run: docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server + run: docker run -d -v .:./.github/assets/aerospike.conf --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server --config-file ./aerospike.conf + + - name: Wait for database to be ready + # Should be ready after 3 seconds + run: sleep 15 + - name: Modify the package.json run: | sudo npm install -g json diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2516b3f58..b2b64a2fe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -107,7 +107,7 @@ jobs: # # - name: Wait for database to be ready # # Should be ready after 3 seconds -# run: sleep 3 +# run: sleep 15 # # - name: Get number of tests # run: echo "NUM_TESTS=$(npm run test-dry-run | grep -oP '\d+ (passing|pending)' | awk '{ sum += $1 } END { print sum }')" >> $GITHUB_ENV @@ -153,11 +153,11 @@ jobs: run: cp -r node-${{ env.LOWEST_SUPPORTED_NODE_MODULE }}-linux-x64 lib/binding/node-${{ env.LOWEST_SUPPORTED_NODE_MODULE }}-linux-x64 - name: Run Aerospike server - run: docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server + run: docker run -d -v .:./.github/assets/aerospike.conf --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server --config-file ./aerospike.conf - name: Wait for database to be ready # Should be ready after 3 seconds - run: sleep 3 + run: sleep 15 - name: Run tests run: | @@ -169,7 +169,7 @@ jobs: npm install ..; tsc; cd ..; - npm run ts-test; + npm run ts-test ; test-ce: runs-on: ubuntu-latest @@ -226,11 +226,12 @@ jobs: - name: Run Aerospike server if: ${{ !contains(github.event.pull_request.labels.*.name, 'new-server-features') }} - run: docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server + run: docker run -d -v .:./.github/assets/aerospike.conf --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server --config-file ./aerospike.conf + - name: Wait for database to be ready # Should be ready after 3 seconds - run: sleep 3 + run: sleep 15 - name: Run tests run: | @@ -281,7 +282,7 @@ jobs: - name: Wait for database to be ready # Should be ready after 3 seconds - run: sleep 3 + run: sleep 15 @@ -417,11 +418,12 @@ jobs: - name: Run Aerospike server if: ${{ !contains(github.event.pull_request.labels.*.name, 'new-server-features') }} - run: docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server + run: docker run -d -v .:./.github/assets/aerospike.conf --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server --config-file ./aerospike.conf + - name: Wait for database to be ready # Should be ready after 3 seconds - run: sleep 3 + run: sleep 15 - name: Run tests run: npm run valgrind -- --t 40000 @@ -469,7 +471,8 @@ jobs: - name: Run Aerospike server if: ${{ !contains(github.event.pull_request.labels.*.name, 'new-server-features') }} - run: docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server + run: docker run -d -v .:./.github/assets/aerospike.conf --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server --config-file ./aerospike.conf + - name: Modify the package.json run: |