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 untested caliper core worker modules #1607

Conversation

tunedev
Copy link
Contributor

@tunedev tunedev commented Aug 19, 2024

Checklist

  • A link to the issue/user story that the pull request relates to
  • How to recreate the problem without the fix
  • Design of the fix
  • How to prove that the fix works
  • Automated tests that prove the fix keeps on working
  • Documentation - any JSDoc, website, or Stackoverflow answers?

Issue/User story

Partially addresses #1606

Steps to Reproduce

Existing issues

Design of the fix

Validation of the fix

After this PR: Running the tests in caliper-core the below listed %stmts in the code coverage report should tally with the below listed

  • caliper-core/lib/worker/caliper-worker.js: 93.75
  • caliper-core/lib/worker/worker-message-handler.js: 89.13
  • caliper-core/lib/worker/fixedFeedbackRate.js: 80
  • caliper-core/lib/worker/recordRate.js: 95.52

Screenshot from 2024-08-19 09-51-05

Before the PR: Running the tests in caliper-core the below listed %stmts in the code coverage report the below listed was what was there before

  • caliper-core/lib/worker/caliper-worker.js: 82
  • caliper-core/lib/worker/worker-message-handler.js: 9.78
  • caliper-core/lib/worker/fixedFeedbackRate.js: 60
  • caliper-core/lib/worker/recordRate.js: 43.28
    Screenshot from 2024-08-19 09-50-20

Automated Tests

What documentation has been provided for this pull request

@tunedev tunedev requested a review from a team August 19, 2024 09:36
@tunedev tunedev force-pushed the test-untested-caliper-core_worker-modules branch 3 times, most recently from fdf4a4c to 1e3cdf4 Compare August 21, 2024 15:56
Copy link
Contributor

@davidkel davidkel left a comment

Choose a reason for hiding this comment

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

Hi sorry, some changes are required. I see you weren't aware about calling private methods in tests and realised it is something we should add to the contributing unit tests in the contributing section. So would be good to add something there.

@tunedev
Copy link
Contributor Author

tunedev commented Aug 23, 2024 via email

caliper-worker
worker-message-handler
fixedFeedbackRate
recordRate

Signed-off-by: Babatunde Sanusi <[email protected]>
@tunedev tunedev force-pushed the test-untested-caliper-core_worker-modules branch from 1e3cdf4 to d0270f4 Compare August 26, 2024 14:51
@aklenik aklenik added the mentorship-2024-testing Part of the testing project of Hyperledger Mentorship 2024 label Aug 27, 2024
Copy link
Contributor

@davidkel davidkel left a comment

Choose a reason for hiding this comment

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

Could you merge these changes into the individual PRs as requested in your other PR please. It will make it easier to review for us and also hopefully make it easier to get code merged quicker

@tunedev
Copy link
Contributor Author

tunedev commented Sep 10, 2024 via email

@tunedev tunedev closed this Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mentorship-2024-testing Part of the testing project of Hyperledger Mentorship 2024
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants