This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Stress Tests 1 - QA Tests - #6595
Merged
Merged
Conversation
avkos
requested review from
Muhammad-Altabba,
jdevcs and
luu-alex
as code owners
November 14, 2023 01:35
Bundle StatsHey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 4.x #6595 +/- ##
=======================================
Coverage 89.36% 89.36%
=======================================
Files 215 215
Lines 8309 8309
Branches 2248 2248
=======================================
Hits 7425 7425
Misses 884 884
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Deploying with
|
| Latest commit: |
bd18b4a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4cc5ab84.web3-js-docs.pages.dev |
| Branch Preview URL: | https://ok-5562-stress-tests-1---qa.web3-js-docs.pages.dev |
Contributor
Author
|
Contributor
Author
luu-alex
approved these changes
Nov 23, 2023
jdevcs
reviewed
Nov 27, 2023
jdevcs
reviewed
Nov 27, 2023
jdevcs
reviewed
Nov 27, 2023
jdevcs
reviewed
Nov 27, 2023
jdevcs
reviewed
Nov 27, 2023
jdevcs
reviewed
Nov 27, 2023
jdevcs
reviewed
Nov 27, 2023
jdevcs
reviewed
Nov 27, 2023
jdevcs
reviewed
Nov 27, 2023
Contributor
Author
alexeykosinski@mac web3.js % yarn test:stress
yarn run v1.22.19
$ yarn test:stress:geth:ws && yarn test:stress:geth:http && yarn test:stress:geth:ipc && yarn test:e2e:stress:geth:ws:chrome
$ ./scripts/test-runner.sh geth-manual ws node manual
Node software used for tests: geth-manual
Node running on: ws://127.0.0.1:8545
$ WEB3_SYSTEM_TEST_BACKEND=geth && ./scripts/geth_binary.sh manualStart 1
Starting manual geth...
geth --ipcpath /Users/alexeykosinski/work/chainsafe/web3.js/tmp/ipc.ipc --nodiscover --nousb --ws --ws.addr 0.0.0.0 --ws.port 8545 --http --http.addr 0.0.0.0 --http.port 8545 --allow-insecure-unlock --http.api personal,web3,eth,admin,debug,txpool,net --ws.api personal,web3,eth,admin,debug,miner,txpool,net --dev --mine --dev.period=0 --dev.gaslimit 9000000000000000 --rpc.txfeecap=1000000 &>/dev/null &
Waiting for geth...
Waiting for localhost:8545.
Connected!
$ node ./scripts/gen_accounts.js
$ lerna run test:integration:stress --stream
lerna notice cli v6.6.2
lerna info versioning independent
> web3:"test:integration:stress"
web3: $ jest --config=./test/stress/jest.config.js --forceExit
web3: PASS test/stress/validation.test.ts
web3: PASS test/stress/data.test.ts
web3: PASS test/stress/requests.test.ts
web3: Test Suites: 3 passed, 3 total
web3: Tests: 9 passed, 9 total
web3: Snapshots: 0 total
web3: Time: 5.093 s, estimated 6 s
web3: Ran all test suites.
web3: Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished?
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> Lerna (powered by Nx) Successfully ran target test:integration:stress for project web3
$ WEB3_SYSTEM_TEST_BACKEND=geth && ./scripts/geth_binary.sh stop
Stopping geth ...
$ ./scripts/test-runner.sh geth-manual http node manual
Node software used for tests: geth-manual
Node running on: http://127.0.0.1:8545
$ WEB3_SYSTEM_TEST_BACKEND=geth && ./scripts/geth_binary.sh manualStart 1
Starting manual geth...
geth --ipcpath /Users/alexeykosinski/work/chainsafe/web3.js/tmp/ipc.ipc --nodiscover --nousb --ws --ws.addr 0.0.0.0 --ws.port 8545 --http --http.addr 0.0.0.0 --http.port 8545 --allow-insecure-unlock --http.api personal,web3,eth,admin,debug,txpool,net --ws.api personal,web3,eth,admin,debug,miner,txpool,net --dev --mine --dev.period=0 --dev.gaslimit 9000000000000000 --rpc.txfeecap=1000000 &>/dev/null &
Waiting for geth...
Waiting for localhost:8545.
Connected!
$ node ./scripts/gen_accounts.js
$ lerna run test:integration:stress --stream
lerna notice cli v6.6.2
lerna info versioning independent
> web3:"test:integration:stress"
web3: $ jest --config=./test/stress/jest.config.js --forceExit
web3: PASS test/stress/validation.test.ts
web3: PASS test/stress/data.test.ts (7.124 s)
web3: PASS test/stress/requests.test.ts (9.352 s)
web3: Test Suites: 3 passed, 3 total
web3: Tests: 9 passed, 9 total
web3: Snapshots: 0 total
web3: Time: 9.617 s
web3: Ran all test suites.
web3: Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished?
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> Lerna (powered by Nx) Successfully ran target test:integration:stress for project web3
$ WEB3_SYSTEM_TEST_BACKEND=geth && ./scripts/geth_binary.sh stop
Stopping geth ...
$ ./scripts/test-runner.sh geth-manual ipc node manual
Node software used for tests: geth-manual
Node running on: ipc://127.0.0.1:8545
$ WEB3_SYSTEM_TEST_BACKEND=geth && ./scripts/geth_binary.sh manualStart 1
Starting manual geth...
geth --ipcpath /Users/alexeykosinski/work/chainsafe/web3.js/tmp/ipc.ipc --nodiscover --nousb --ws --ws.addr 0.0.0.0 --ws.port 8545 --http --http.addr 0.0.0.0 --http.port 8545 --allow-insecure-unlock --http.api personal,web3,eth,admin,debug,txpool,net --ws.api personal,web3,eth,admin,debug,miner,txpool,net --dev --mine --dev.period=0 --dev.gaslimit 9000000000000000 --rpc.txfeecap=1000000 &>/dev/null &
Waiting for geth...
Waiting for localhost:8545.
Connected!
$ node ./scripts/gen_accounts.js
$ lerna run test:integration:stress --stream
lerna notice cli v6.6.2
lerna info versioning independent
> web3:"test:integration:stress"
$ jest --config=./test/stress/jest.config.js --forceExit
web3: PASS test/stress/validation.test.ts (5.449 s)
web3: PASS test/stress/requests.test.ts (5.424 s)
web3: PASS test/stress/data.test.ts (8.809 s)
web3: Test Suites: 3 passed, 3 total
web3: Tests: 9 passed, 9 total
web3: Snapshots: 0 total
web3: Time: 9.291 s, estimated 10 s
web3: Ran all test suites.
web3: Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished?
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> Lerna (powered by Nx) Successfully ran target test:integration:stress for project web3
$ WEB3_SYSTEM_TEST_BACKEND=geth && ./scripts/geth_binary.sh stop
Stopping geth ...
$ ./scripts/test-runner.sh geth-manual ws chrome manual
Node software used for tests: geth-manual
Node running on: ws://127.0.0.1:8545
$ WEB3_SYSTEM_TEST_BACKEND=geth && ./scripts/geth_binary.sh manualStart 1
Starting manual geth...
geth --ipcpath /Users/alexeykosinski/work/chainsafe/web3.js/tmp/ipc.ipc --nodiscover --nousb --ws --ws.addr 0.0.0.0 --ws.port 8545 --http --http.addr 0.0.0.0 --http.port 8545 --allow-insecure-unlock --http.api personal,web3,eth,admin,debug,txpool,net --ws.api personal,web3,eth,admin,debug,miner,txpool,net --dev --mine --dev.period=0 --dev.gaslimit 9000000000000000 --rpc.txfeecap=1000000 &>/dev/null &
Waiting for geth...
Waiting for localhost:8545.
Connected!
$ node ./scripts/gen_accounts.js
$ /Users/alexeykosinski/work/chainsafe/web3.js/node_modules/.bin/lerna run test:e2e:chrome:stress --stream
lerna notice cli v6.6.2
lerna info versioning independent
> web3:"test:e2e:chrome:stress"
web3: $ npx cypress run --headless --browser chrome
web3: 2023-11-27 18:07:28.369 Cypress[64554:4452251] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
web3: Couldn't find tsconfig.json. tsconfig-paths will be skipped
web3: ====================================================================================================
web3: (Run Starting)
web3: ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
web3: │ Cypress: 10.7.0 │
web3: │ Browser: Chrome 119 (headless) │
web3: │ Node Version: v16.18.0 (/usr/local/bin/node) │
web3: │ Specs: 3 found (data.test.ts, requests.test.ts, validation.test.ts) │
web3: │ Searched: test/e2e_manual/**/**/*.test.ts │
web3: └────────────────────────────────────────────────────────────────────────────────────────────────┘
web3: ────────────────────────────────────────────────────────────────────────────────────────────────────
web3:
web3: Running: data.test.ts (1 of 3)
web3:
web3: huge data
web3: ✓ send and get (3306ms)
web3: 1 passing (3s)
web3: (Results)
web3: ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
web3: │ Tests: 1 │
web3: │ Passing: 1 │
web3: │ Failing: 0 │
web3: │ Pending: 0 │
web3: │ Skipped: 0 │
web3: │ Screenshots: 0 │
web3: │ Video: false │
web3: │ Duration: 3 seconds │
web3: │ Spec Ran: data.test.ts │
web3: └────────────────────────────────────────────────────────────────────────────────────────────────┘
web3: ────────────────────────────────────────────────────────────────────────────────────────────────────
web3:
web3: Running: requests.test.ts (2 of 3)
web3:
web3: huge data
web3: ✓ send requests (4326ms)
web3: ✓ get requests (32ms)
web3: 2 passing (4s)
web3: (Results)
web3: ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
web3: │ Tests: 2 │
web3: │ Passing: 2 │
web3: │ Failing: 0 │
web3: │ Pending: 0 │
web3: │ Skipped: 0 │
web3: │ Screenshots: 0 │
web3: │ Video: false │
web3: │ Duration: 4 seconds │
web3: │ Spec Ran: requests.test.ts │
web3: └────────────────────────────────────────────────────────────────────────────────────────────────┘
web3: ────────────────────────────────────────────────────────────────────────────────────────────────────
web3:
web3: Running: validation.test.ts (3 of 3)
web3:
web3: validator
web3: ✓ huge schema (61ms)
web3: ✓ huge schema 1000 (78ms)
web3: ✓ simple schema multiple times (32ms)
web3: ✓ simple schema 1000 times (60ms)
web3: ✓ simple JSON schema 1000 times (45ms)
web3: ✓ simple ABI 1000 times (42ms)
web3: 6 passing (332ms)
web3: (Results)
web3: ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
web3: │ Tests: 6 │
web3: │ Passing: 6 │
web3: │ Failing: 0 │
web3: │ Pending: 0 │
web3: │ Skipped: 0 │
web3: │ Screenshots: 0 │
web3: │ Video: false │
web3: │ Duration: 0 seconds │
web3: │ Spec Ran: validation.test.ts │
web3: └────────────────────────────────────────────────────────────────────────────────────────────────┘
web3: ====================================================================================================
web3: (Run Finished)
web3: Spec Tests Passing Failing Pending Skipped
web3: ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
web3: │ ✔ data.test.ts 00:03 1 1 - - - │
web3: ├────────────────────────────────────────────────────────────────────────────────────────────────┤
web3: │ ✔ requests.test.ts 00:04 2 2 - - - │
web3: ├────────────────────────────────────────────────────────────────────────────────────────────────┤
web3: │ ✔ validation.test.ts 329ms 6 6 - - - │
web3: └────────────────────────────────────────────────────────────────────────────────────────────────┘
web3: ✔ All specs passed! 00:08 9 9 - - -
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> Lerna (powered by Nx) Successfully ran target test:e2e:chrome:stress for project web3
$ WEB3_SYSTEM_TEST_BACKEND=geth && ./scripts/geth_binary.sh stop
Stopping geth ...
✨ Done in 82.75s.
alexeykosinski@mac web3.js %
|
jdevcs
approved these changes
Nov 28, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
Please include a summary of the changes and be sure to follow our Contribution Guidelines.
Fixes #5562
Type of change
Checklist:
npm run lintwith success and extended the tests and types if necessary.npm run test:unitwith success.npm run test:coverageand my test cases cover all the lines and branches of the added code.npm run buildand testeddist/web3.min.jsin a browser.CHANGELOG.mdfile in the root folder.