hashgraph / hedera-mirror-node

Hedera Mirror Node archives data from consensus nodes and serves it via an API
Apache License 2.0
128 stars 108 forks source link

Add negative scenarios for historical tests #9345

Closed bilyana-gospodinova closed 2 weeks ago

bilyana-gospodinova commented 2 weeks ago

Description: This PR adds some new test related to the historical scenarios. They verify that the correct data is fetched having a particular historical timestamp. The tests are located in ContractCallServiceHistoricalNegativeTest.

A new abstract class is added - AbstractContractCallServiceHistoricalTest. It contains some common methods related to the historical data persist.

The methods in AbstractContractCallServiceHistoricalTest and AbstractContractCallServiceTest are named with persist instead of persist in order to use the IDE's auto suggest easily. The second approach would list too much methods as they all start with "p" and this makes the search harder, so I renamed some of the old methods.

Fixes https://github.com/hashgraph/hedera-mirror-node/issues/9317

Checklist

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.55%. Comparing base (fe60726) to head (3e0550d). Report is 4 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9345 +/- ## ============================================ + Coverage 92.52% 92.55% +0.03% - Complexity 7012 7016 +4 ============================================ Files 904 904 Lines 29669 29669 Branches 3751 3751 ============================================ + Hits 27451 27460 +9 + Misses 1447 1444 -3 + Partials 771 765 -6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud