unable to run caliper tests #265

Closed
opened 2022-01-23 06:24:14 +00:00 by prandnum · 5 comments
prandnum commented 2022-01-23 06:24:14 +00:00 (Migrated from gitlab.com)

In order to familiarise myself with the existing tool, tried running the caliper tests as mentioned in gitlab.com/PBSA/tools-libs/peerplays-utils/-/tree/master/caliper-peerplays-tests/README.md, which resulted in the following errors

  1. complains that no basic-private-net folder is present
  2. complains "Error: Cannot find module '@hyperledger/caliper-core"
ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$ node -v
v16.13.2
ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$ npm -v
8.3.2
ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$
ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils$ ls -lrt
total 28
-rw-rw-r-- 1 ubuntu ubuntu  305 Jan 21 11:11 README.md
drwxrwxr-x 2 ubuntu ubuntu 4096 Jan 21 11:11 peerplays-proposal-creation
drwxrwxr-x 6 ubuntu ubuntu 4096 Jan 21 11:11 caliper-peerplays
drwxrwxr-x 2 ubuntu ubuntu 4096 Jan 21 11:26 node_modules
drwxrwxr-x 8 ubuntu ubuntu 4096 Jan 22 12:31 peerplays-qa-environment
drwxrwxr-x 2 ubuntu ubuntu 4096 Jan 22 12:31 jmeter-script-for-draw
drwxrwxr-x 6 ubuntu ubuntu 4096 Jan 22 12:54 caliper-peerplays-tests
ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils$ git branch -a
  caliper-tests-for-peerplays
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/bug/issue50
  remotes/origin/dependabot/npm_and_yarn/caliper-peerplays/packages/caliper-core/systeminformation-4.27.11
  remotes/origin/docker
  remotes/origin/feature/438/add-hardware-requirements-for-environment-setup
  remotes/origin/feature/5-dockerizing-qa-env
  remotes/origin/feature/caliper-tests-for-peerplays
  remotes/origin/jmeter_scripts
  remotes/origin/master
  remotes/origin/proposals
  remotes/origin/support/caliper
  remotes/origin/tests
ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils$ cd caliper-peerplays-tests
ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$ npm i

up to date, audited 1289 packages in 12s

74 vulnerabilities (2 low, 30 moderate, 38 high, 4 critical)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$ ls -lrt
total 988
-rwxrwxr-x 1 ubuntu ubuntu   1059 Jan 21 11:11 run-tests.sh
-rw-rw-r-- 1 ubuntu ubuntu    414 Jan 21 11:11 package.json
-rw-rw-r-- 1 ubuntu ubuntu    411 Jan 21 11:11 README.md
drwxrwxr-x 3 ubuntu ubuntu   4096 Jan 22 12:31 master-private-net_tests
drwxrwxr-x 3 ubuntu ubuntu   4096 Jan 22 12:31 develop-private-net_tests
drwxrwxr-x 5 ubuntu ubuntu   4096 Jan 22 12:32 node_modules
-rw-rw-r-- 1 ubuntu ubuntu 979964 Jan 23 06:15 package-lock.json
ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$ BENCHMARK=basic-private-net ./run-tests.sh
set -o pipefail

# Barf if we don't recognize this test connector.
if [[ "${BENCHMARK}" = "" ]]; then
    echo You must set BENCHMARK to one of the desired test collections 'master-private-net|develop-private-net'
    echo For example:
    echo  export BENCHMARK=basic-private-net
    exit 1
fi

TEST_DIR="${BENCHMARK}_tests"
if [[ -d "${TEST_DIR}" ]]; then
    "${TEST_DIR}"/run.sh
else
    echo "Unknown target benchmark ${BENCHMARK}"
    exit 1
fi
Unknown target benchmark basic-private-net
ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$ BENCHMARK=develop-private-net ./run-tests.sh
set -o pipefail

# Barf if we don't recognize this test connector.
if [[ "${BENCHMARK}" = "" ]]; then
    echo You must set BENCHMARK to one of the desired test collections 'master-private-net|develop-private-net'
    echo For example:
    echo  export BENCHMARK=basic-private-net
    exit 1
fi

TEST_DIR="${BENCHMARK}_tests"
if [[ -d "${TEST_DIR}" ]]; then
    "${TEST_DIR}"/run.sh
else
    echo "Unknown target benchmark ${BENCHMARK}"
    exit 1
fi

# Grab the parent directory.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${DIR}"

npx caliper launch manager \
        --caliper-bind-sut peerplays:latest \
        --caliper-workspace ./ \
        --caliper-benchconfig benchconfig.yaml \
        --caliper-networkconfig networkconfig.json
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module '@hyperledger/caliper-core'
Require stack:
- /home/ubuntu/CALIPER/peerplays-utils/caliper-peerplays/packages/caliper-cli/caliper.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/ubuntu/CALIPER/peerplays-utils/caliper-peerplays/packages/caliper-cli/caliper.js:19:26)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/ubuntu/CALIPER/peerplays-utils/caliper-peerplays/packages/caliper-cli/caliper.js'
  ]
}
ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$
In order to familiarise myself with the existing tool, tried running the caliper tests as mentioned in gitlab.com/PBSA/tools-libs/peerplays-utils/-/tree/master/caliper-peerplays-tests/README.md, which resulted in the following errors 1. complains that no basic-private-net folder is present 2. complains "Error: Cannot find module '@hyperledger/caliper-core" ``` ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$ node -v v16.13.2 ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$ npm -v 8.3.2 ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$ ``` ``` ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils$ ls -lrt total 28 -rw-rw-r-- 1 ubuntu ubuntu 305 Jan 21 11:11 README.md drwxrwxr-x 2 ubuntu ubuntu 4096 Jan 21 11:11 peerplays-proposal-creation drwxrwxr-x 6 ubuntu ubuntu 4096 Jan 21 11:11 caliper-peerplays drwxrwxr-x 2 ubuntu ubuntu 4096 Jan 21 11:26 node_modules drwxrwxr-x 8 ubuntu ubuntu 4096 Jan 22 12:31 peerplays-qa-environment drwxrwxr-x 2 ubuntu ubuntu 4096 Jan 22 12:31 jmeter-script-for-draw drwxrwxr-x 6 ubuntu ubuntu 4096 Jan 22 12:54 caliper-peerplays-tests ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils$ git branch -a caliper-tests-for-peerplays * master remotes/origin/HEAD -> origin/master remotes/origin/bug/issue50 remotes/origin/dependabot/npm_and_yarn/caliper-peerplays/packages/caliper-core/systeminformation-4.27.11 remotes/origin/docker remotes/origin/feature/438/add-hardware-requirements-for-environment-setup remotes/origin/feature/5-dockerizing-qa-env remotes/origin/feature/caliper-tests-for-peerplays remotes/origin/jmeter_scripts remotes/origin/master remotes/origin/proposals remotes/origin/support/caliper remotes/origin/tests ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils$ cd caliper-peerplays-tests ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$ npm i up to date, audited 1289 packages in 12s 74 vulnerabilities (2 low, 30 moderate, 38 high, 4 critical) To address all issues, run: npm audit fix Run `npm audit` for details. ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$ ls -lrt total 988 -rwxrwxr-x 1 ubuntu ubuntu 1059 Jan 21 11:11 run-tests.sh -rw-rw-r-- 1 ubuntu ubuntu 414 Jan 21 11:11 package.json -rw-rw-r-- 1 ubuntu ubuntu 411 Jan 21 11:11 README.md drwxrwxr-x 3 ubuntu ubuntu 4096 Jan 22 12:31 master-private-net_tests drwxrwxr-x 3 ubuntu ubuntu 4096 Jan 22 12:31 develop-private-net_tests drwxrwxr-x 5 ubuntu ubuntu 4096 Jan 22 12:32 node_modules -rw-rw-r-- 1 ubuntu ubuntu 979964 Jan 23 06:15 package-lock.json ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$ BENCHMARK=basic-private-net ./run-tests.sh set -o pipefail # Barf if we don't recognize this test connector. if [[ "${BENCHMARK}" = "" ]]; then echo You must set BENCHMARK to one of the desired test collections 'master-private-net|develop-private-net' echo For example: echo export BENCHMARK=basic-private-net exit 1 fi TEST_DIR="${BENCHMARK}_tests" if [[ -d "${TEST_DIR}" ]]; then "${TEST_DIR}"/run.sh else echo "Unknown target benchmark ${BENCHMARK}" exit 1 fi Unknown target benchmark basic-private-net ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$ BENCHMARK=develop-private-net ./run-tests.sh set -o pipefail # Barf if we don't recognize this test connector. if [[ "${BENCHMARK}" = "" ]]; then echo You must set BENCHMARK to one of the desired test collections 'master-private-net|develop-private-net' echo For example: echo export BENCHMARK=basic-private-net exit 1 fi TEST_DIR="${BENCHMARK}_tests" if [[ -d "${TEST_DIR}" ]]; then "${TEST_DIR}"/run.sh else echo "Unknown target benchmark ${BENCHMARK}" exit 1 fi # Grab the parent directory. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "${DIR}" npx caliper launch manager \ --caliper-bind-sut peerplays:latest \ --caliper-workspace ./ \ --caliper-benchconfig benchconfig.yaml \ --caliper-networkconfig networkconfig.json node:internal/modules/cjs/loader:936 throw err; ^ Error: Cannot find module '@hyperledger/caliper-core' Require stack: - /home/ubuntu/CALIPER/peerplays-utils/caliper-peerplays/packages/caliper-cli/caliper.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (/home/ubuntu/CALIPER/peerplays-utils/caliper-peerplays/packages/caliper-cli/caliper.js:19:26) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/ubuntu/CALIPER/peerplays-utils/caliper-peerplays/packages/caliper-cli/caliper.js' ] } ubuntu@ip-172-31-35-225:~/CALIPER/peerplays-utils/caliper-peerplays-tests$ ```
prandnum commented 2022-01-23 06:24:15 +00:00 (Migrated from gitlab.com)

assigned to @serkixenos

assigned to @serkixenos
prandnum commented 2022-01-23 13:21:47 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
prandnum commented 2022-01-26 13:18:21 +00:00 (Migrated from gitlab.com)

@bobinson @serkixenos

CC: @hbelakon

@bobinson @serkixenos CC: @hbelakon
serkixenos commented 2022-01-26 14:58:34 +00:00 (Migrated from gitlab.com)

@prandnum This might be a long shot, as current Caliper version is much different than what we have in our repo.
You may want to investigate other means for performance benchmarking, until we are done with upgrading.

@prandnum This might be a long shot, as current Caliper version is much different than what we have in our repo. You may want to investigate other means for performance benchmarking, until we are done with upgrading.
serkixenos commented 2022-02-01 20:19:00 +00:00 (Migrated from gitlab.com)

moved to PBSA/tools-libs/peerplays-utils#6

moved to PBSA/tools-libs/peerplays-utils#6
serkixenos (Migrated from gitlab.com) closed this issue 2022-02-01 20:19:00 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Peerplays_Blockchain/peerplays_migrated#265
No description provided.