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

Fix balance monitor api tests #4676

Merged

Conversation

MarcKriguerAtHedera
Copy link
Contributor

@MarcKriguerAtHedera MarcKriguerAtHedera commented Oct 18, 2022

Description:

Fix balance monitor api tests to reflect the fact that balances are now 'live' and not tied to the REST API /balances response timestamp.

  • Change checkBalanceFreshness call to specify timestamp =
  • Remove getBalancesWithTimeAndLimitParams check since it no longer makes sense with live balances.

Related issue(s):

Fixes #4674

Notes for reviewer:

0|server  | 2022-10-17T17:15:59.111-07:00 INFO Running test #1
0|server  | 2022-10-17T17:15:59.126-07:00 INFO Server running on port: 3000
0|server  | 2022-10-17T17:15:59.746-07:00 INFO Completed test run #1 for testnet with 17/17 tests passed in 635 ms
0|server  | 2022-10-17T17:15:59.746-07:00 INFO Finished test run #1 in 635 ms
0|server  | 2022-10-17T17:17:00.334-07:00 INFO Completed test run #2 for testnet with 17/17 tests passed in 587 ms
0|server  | 2022-10-17T17:17:00.334-07:00 INFO Finished test run #2 in 587 ms

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (using testnet api_monitor)

… 'live' and not tied to the REST API /balances

timestamp.

Signed-off-by: Marc Kriguer <marc.kriguer@swirldslabs.com>
@MarcKriguerAtHedera MarcKriguerAtHedera linked an issue Oct 18, 2022 that may be closed by this pull request
@MarcKriguerAtHedera MarcKriguerAtHedera self-assigned this Oct 18, 2022
@MarcKriguerAtHedera MarcKriguerAtHedera added bug Type: Something isn't working monitor Area: Monitoring and dashboard balances File: Related to processing of balance stream file labels Oct 18, 2022
@MarcKriguerAtHedera MarcKriguerAtHedera modified the milestones: 0.68.0, 0.67.0, 0.66.1 Oct 18, 2022
@MarcKriguerAtHedera MarcKriguerAtHedera requested a review from a team October 18, 2022 00:23
Signed-off-by: Marc Kriguer <marc.kriguer@swirldslabs.com>
@codecov
Copy link

codecov bot commented Oct 18, 2022

Codecov Report

Base: 92.53% // Head: 92.51% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (203e3bc) compared to base (634f804).
Patch has no changes to coverable lines.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4676      +/-   ##
============================================
- Coverage     92.53%   92.51%   -0.03%     
+ Complexity     2954     2952       -2     
============================================
  Files           542      544       +2     
  Lines         17426    17508      +82     
  Branches       1836     1850      +14     
============================================
+ Hits          16125    16197      +72     
- Misses          949      959      +10     
  Partials        352      352              
Impacted Files Coverage Δ
...hedera/mirror/grpc/config/GrpcHealthIndicator.java 46.15% <0.00%> (-46.16%) ⬇️
controllers/contractController.js 97.13% <0.00%> (-0.21%) ⬇️
constants.js 100.00% <0.00%> (ø)
routes/contractRoute.js 100.00% <0.00%> (ø)
controllers/blockController.js 100.00% <0.00%> (ø)
viewmodel/contractStateViewModel.js 100.00% <0.00%> (ø)
model/contractState.js 83.33% <0.00%> (ø)
controllers/baseController.js 98.76% <0.00%> (+0.03%) ⬆️
utils.js 97.34% <0.00%> (+0.03%) ⬆️
service/contractService.js 97.00% <0.00%> (+0.15%) ⬆️
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@steven-sheehy steven-sheehy changed the title Fix balance monitor api tests to reflect the fact that … Fix balance monitor api tests Oct 18, 2022
steven-sheehy
steven-sheehy previously approved these changes Oct 18, 2022
hedera-mirror-rest/monitoring/monitor_apis/utils.js Outdated Show resolved Hide resolved
xin-hedera
xin-hedera previously approved these changes Oct 18, 2022
Copy link
Collaborator

@xin-hedera xin-hedera left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Marc Kriguer <marc.kriguer@swirldslabs.com>
@sonarcloud
Copy link

sonarcloud bot commented Oct 18, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@MarcKriguerAtHedera MarcKriguerAtHedera merged commit 3196337 into main Oct 18, 2022
@MarcKriguerAtHedera MarcKriguerAtHedera deleted the 04674-fix-balances-monitor-tests-for-live-balances branch October 18, 2022 16:43
MarcKriguerAtHedera added a commit that referenced this pull request Oct 18, 2022
* Fix balance monitor api tests to handle the fact that balnces are now 'live' and not tied to the REST API /balances
timestamp.

Signed-off-by: Marc Kriguer <marc.kriguer@swirldslabs.com>
MarcKriguerAtHedera added a commit that referenced this pull request Oct 18, 2022
* Fix balance monitor api tests to handle the fact that balnces are now 'live' and not tied to the REST API /balances
timestamp.

Signed-off-by: Marc Kriguer <marc.kriguer@swirldslabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
balances File: Related to processing of balance stream file bug Type: Something isn't working monitor Area: Monitoring and dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Monitor not updated for current account balance
3 participants