Skip to content
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

test(connector-fabric): fix flaky test 2.2.x deploy-cc-from-javascript #2628

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

petermetz
Copy link
Contributor

Primary changes:

  1. Added robust debug logging to the express middleware of the API server
    so that problems like this are easier to debug in the future (e.g.
    trouble with the Open API spec documents themselves)
  2. Refactored the ci.yaml document so that there are separate jobs for
    each tape based Fabric connector integration test. This has reduced
    (or potentially eliminated) the presence of the flake that we were
    encountering during the contract deployment test cases. It also has the
    upside of faster CI because of more parallelism in the CI jobs.
  3. Updated the assertions in a couple of test cases where the newer Fabric
    versions were causing the assertions to fail because the returned JSON
    response in the example asset transfer chaincode is now referring to the
    asset owner via a property named "Owner" not "owner" (casing difference)

Fixes #1471

Signed-off-by: Peter Somogyvari peter.somogyvari@accenture.com

@petermetz
Copy link
Contributor Author

petermetz commented Aug 20, 2023

FYI: I've split this into 2 commits because one of them is an important bug-fix (that I uncovered while investigating the test flake) while the rest of the diff is much bigger and not an actual bug fix (just addresses the flakiness of the test but does not fix bug in the production code at all)

This way the bug-fix will show up in the release notes when they get generated.

@petermetz petermetz changed the title Petermetz/issue1471 test(connector-fabric): fix flaky test 2.2.x deploy-cc-from-javascript Aug 20, 2023
@petermetz petermetz added this to the v2.0.0-alpha.2 milestone Aug 20, 2023
Copy link
Contributor

@izuru0 izuru0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

The "express-openapi-validator" package was crashing while trying to
parse our Fabric connector's Open API spec because of the typo that
in the specs the "description" field for some schema elements were named
"properties" which is a reserved field in the schema of the specs.

Fixing the typo in the spec document made the problem go away.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Primary changes:
---------------

1. Added robust debug logging to the express middleware of the API server
so that problems like this are easier to debug in the future (e.g.
trouble with the Open API spec documents themselves)
2. Refactored the ci.yaml document so that there are separate jobs for
each tape based Fabric connector integration test. This has reduced
(or potentially eliminated) the presence of the flake that we were
encountering during the contract deployment test cases. It also has the
upside of faster CI because of more parallelism in the CI jobs.
3. Updated the assertions in a couple of test cases where the newer Fabric
versions were causing the assertions to fail because the returned JSON
response in the example asset transfer chaincode is now referring to the
asset owner via a property named "Owner" not "owner" (casing difference)

Fixes hyperledger-cacti#1471

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
@petermetz petermetz merged commit 08afe1a into hyperledger-cacti:main Aug 21, 2023
121 of 129 checks passed
@petermetz petermetz deleted the petermetz/issue1471 branch August 21, 2023 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test(connector-fabric): fix flaky test 2.2.x deploy-cc-from-javascript
3 participants