Skip to content

Commit

Permalink
test(connector-fabric): consolidate 3 tests into deploy-lock-asset.test
Browse files Browse the repository at this point in the history
1. This is making the test case harder to read but shaves off easily
10 to 15 minutes from one of our slowest CI jobs which can take up to an
hour to run when the GitHub runners are feeling lazy.
2. That above is my only justification for it. The test cases I'm consolidating
are relatively stable at this point (took us years to get here but now they
are passing with a high ratio and the false negatives have pretty much
disappeared).
3. We are downloading and launching the fabirc AIO ledger 10+ times which
is very resource intensive and this could help make a dent in it.

Running this test right now looks like this on my machine:

 PASS  packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/
 integration/fabric-v2-2-x/deploy-lock-asset.test.ts (277.062 s, 638 MB heap size)

  PluginLedgerConnectorFabric
    ✓ getBlockV1() -Get first block by it's number - decoded. (1216 ms)
    ✓ getBlockV1() - Get first block by it's number - encoded. (1084 ms)
    ✓ getBlockV1() - Get a block by transactionId it contains (4534 ms)
    ✓ getBlockV1() - Get a block by transactionId it contains - cacti transactions (4535 ms)
    ✓ getBlockV1() - Get a block by transactionId it contains - cacti full block (4559 ms)
    ✓ getBlockV1() - Get block by it's hash. (6727 ms)
    ✓ getBlockV1() - Reading block with invalid number returns an error. (1 ms)
    ✓ GetChainInfoV1() - Get test ledger chain info. (2134 ms)
    ✓ deployContractV1() - deploys Fabric 2.x contract from go source (38351 ms)
    ✓ deployContractV1() - deploys contract and performs transactions (40840 ms)

Test Suites: 1 passed, 1 total
Tests:       10 passed, 10 total
Snapshots:   0 total
Time:        277.117 s

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz committed Sep 5, 2024
1 parent bdc5cd7 commit 043a8b6
Show file tree
Hide file tree
Showing 5 changed files with 669 additions and 927 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
examples/cactus-example-carbon-accounting-frontend/www/
examples/cactus-example-supply-chain-frontend/www/
weaver/core/identity-management/iin-agent/out/
weaver/common/protos-js/build/

**/src/main/typescript/generated/proto/**
**/src/main/typescript/generated/wasm-pack/**
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1459,14 +1459,13 @@ jobs:
continue-on-error: false
env:
CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric"
HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}'
HFC_LOGGING: ''
FULL_BUILD_DISABLED: true
FREE_UP_GITHUB_RUNNER_DISK_SPACE_DISABLED: false
JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
JEST_TEST_RUNNER_DISABLED: false
JEST_TEST_COVERAGE_PATH: ./code-coverage-ts/plc-fabric-0
JEST_TEST_CODE_COVERAGE_ENABLED: true
TAPE_TEST_PATTERN: ""
TAPE_TEST_RUNNER_DISABLED: true
runs-on: ubuntu-22.04
steps:
Expand Down

This file was deleted.

Loading

0 comments on commit 043a8b6

Please sign in to comment.