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: Token Service unit tests with non-zero shard and realm config #17886

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

JivkoKelchev
Copy link
Contributor

Description:

Fix failing tests. Add entityId factory to all base classes and load the shard and realm values from the configuration.

Related issue(s):

Fixes #17835

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@JivkoKelchev JivkoKelchev added this to the v0.60 milestone Feb 13, 2025
@JivkoKelchev JivkoKelchev self-assigned this Feb 13, 2025
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.

Project coverage is 69.01%. Comparing base (0515075) to head (fc7af90).

Files with missing lines Patch % Lines
...va/com/hedera/node/app/ids/AppEntityIdFactory.java 0.00% 11 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #17886      +/-   ##
============================================
- Coverage     69.01%   69.01%   -0.01%     
+ Complexity    23050    23048       -2     
============================================
  Files          2655     2655              
  Lines         99675    99686      +11     
  Branches      10289    10289              
============================================
- Hits          68795    68794       -1     
- Misses        26981    26992      +11     
- Partials       3899     3900       +1     
Files with missing lines Coverage Δ
...va/com/hedera/node/app/ids/AppEntityIdFactory.java 45.00% <0.00%> (-55.00%) ⬇️

... and 1 file with indirect coverage changes

Impacted file tree graph

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.01% (target: -1.00%) 0.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (0515075) 99458 72533 72.93%
Head commit (fc7af90) 99469 (+11) 72533 (+0) 72.92% (-0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#17886) 11 0 0.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@JivkoKelchev JivkoKelchev marked this pull request as ready for review February 17, 2025 15:03
@JivkoKelchev JivkoKelchev requested a review from a team as a code owner February 17, 2025 15:03
povolev15
povolev15 previously approved these changes Feb 18, 2025
@povolev15
Copy link
Contributor

LGTM @JivkoKelchev TY. but you have some conflicts.

# Conflicts:
#	hedera-node/hedera-app-spi/src/testFixtures/java/com/hedera/node/app/spi/fixtures/ids/FakeEntityIdFactoryImpl.java
#	hedera-node/hedera-app/src/main/java/com/hedera/node/app/ids/AppEntityIdFactory.java
#	hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/ReadableAccountStoreImplTest.java
#	hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/BaseCryptoHandlerTest.java
#	hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/CryptoCreateHandlerTest.java
#	hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/CryptoDeleteAllowanceHandlerTest.java
#	hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/CryptoGetAccountRecordsHandlerTest.java
#	hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/CryptoTransferHandlerPureChecksTest.java
#	hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/util/CryptoHandlerTestBase.java
#	hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/util/CryptoTokenHandlerTestBase.java
#	hedera-node/hedera-token-service-impl/src/test/java/com/hedera/node/app/service/token/impl/test/handlers/util/TokenHandlerTestBase.java
#	platform-sdk/swirlds-state-api/src/main/java/com/swirlds/state/lifecycle/EntityIdFactory.java
Signed-off-by: Zhivko Kelchev <[email protected]>
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.

Run hedera-token-service-impl unit tests with shard/realm different then 0/0 and fix errors
2 participants