hedera-services icon indicating copy to clipboard operation
hedera-services copied to clipboard

test: use temp dir instead of `**/swirlds-tmp`

Open MiroslavGatsanoga opened this issue 1 year ago • 10 comments

Description:

This PR builds upon the changes from https://github.com/hashgraph/hedera-services/pull/14157, fixing for the only one left directory (**/swirlds-tmp).

Related issue(s):

Fixes https://github.com/hashgraph/hedera-services/issues/6714

Notes for reviewer:

The changes introduced are mostly in platform-sdk tests, I have opened this as separate PR from https://github.com/hashgraph/hedera-services/pull/14157 in order to make reviewing easier (i.e. smaller diff).

Apart from test files there are also som implementation files where changes were introduced, namely MerkleDb.java and LongListDisk.java, replacing the usage of the deprecated LegacyTemporaryFileBuilder with Files.createTempDirectory(). Additionally some files were updated in order to limit the usage of the deprecated ConfigurationHolder.

Checklist

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

MiroslavGatsanoga avatar Aug 08 '24 15:08 MiroslavGatsanoga

Node: HAPI Test (Restart) Results

7 tests   2 :white_check_mark:  3m 5s :stopwatch: 8 suites  0 :zzz: 9 files    5 :x: 1 errors

For more details on these parsing errors and failures, see this check.

Results for commit d183651d.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Aug 08 '24 16:08 github-actions[bot]

Node: HAPI Test (Token) Results

 22 files  ±0   22 suites  ±0   5m 50s :stopwatch: +6s 281 tests ±0  281 :white_check_mark: ±0  0 :zzz: ±0  0 :x: ±0  364 runs  ±0  364 :white_check_mark: ±0  0 :zzz: ±0  0 :x: ±0 

Results for commit f81ca90f. ± Comparison against base commit 62d26c41.

github-actions[bot] avatar Aug 08 '24 16:08 github-actions[bot]

Node: HAPI Test (Node Death Reconnect) Results

3 tests  ±0   3 :white_check_mark: ±0   5m 12s :stopwatch: +14s 3 suites ±0   0 :zzz: ±0  3 files   ±0   0 :x: ±0 

Results for commit f81ca90f. ± Comparison against base commit 62d26c41.

github-actions[bot] avatar Aug 08 '24 16:08 github-actions[bot]

Node: HAPI Test (Crypto) Results

 32 files  ±0   32 suites  ±0   12m 16s :stopwatch: +18s 364 tests ±0  364 :white_check_mark: ±0  0 :zzz: ±0  0 :x: ±0  395 runs  ±0  395 :white_check_mark: ±0  0 :zzz: ±0  0 :x: ±0 

Results for commit f81ca90f. ± Comparison against base commit 62d26c41.

github-actions[bot] avatar Aug 08 '24 16:08 github-actions[bot]

Node: HAPI Test (Misc) Results

 61 files  ±0   61 suites  ±0   17m 11s :stopwatch: +38s 319 tests ±0  319 :white_check_mark: ±0  0 :zzz: ±0  0 :x: ±0  409 runs  ±0  409 :white_check_mark: ±0  0 :zzz: ±0  0 :x: ±0 

Results for commit f81ca90f. ± Comparison against base commit 62d26c41.

github-actions[bot] avatar Aug 08 '24 16:08 github-actions[bot]

Node: HAPI Test (Time Consuming) Results

19 tests  ±0   19 :white_check_mark: ±0   22m 27s :stopwatch: -56s  4 suites ±0    0 :zzz: ±0   4 files   ±0    0 :x: ±0 

Results for commit f81ca90f. ± Comparison against base commit 62d26c41.

github-actions[bot] avatar Aug 08 '24 16:08 github-actions[bot]

Node: HAPI Test (Smart Contract) Results

 92 files   - 1   92 suites   - 1   26m 6s :stopwatch: + 2m 11s 660 tests ±0  660 :white_check_mark: ±0  0 :zzz: ±0  0 :x: ±0  872 runs  ±0  872 :white_check_mark: ±0  0 :zzz: ±0  0 :x: ±0 

Results for commit f81ca90f. ± Comparison against base commit 62d26c41.

github-actions[bot] avatar Aug 08 '24 16:08 github-actions[bot]

Node: Unit Test Results

  1 556 files  ±0    1 556 suites  ±0   3h 49m 2s :stopwatch: + 14m 56s 117 495 tests ±0  117 436 :white_check_mark: ±0  59 :zzz: ±0  0 :x: ±0  125 709 runs  ±0  125 650 :white_check_mark: ±0  59 :zzz: ±0  0 :x: ±0 

Results for commit f81ca90f. ± Comparison against base commit 62d26c41.

github-actions[bot] avatar Aug 08 '24 17:08 github-actions[bot]

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +0.00% (target: -1.00%) :white_check_mark: 90.48%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (0759d3db9bc5b341e9180980270a40ecd63701ba) 97519 63701 65.32%
Head commit (288fc188f7be38f0198eb7e26ba7751cd2986a7d) 97521 (+2) 63700 (-1) 65.32% (+0.00%)

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 (#14695) 21 19 90.48%

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

codacy-production[bot] avatar Aug 22 '24 11:08 codacy-production[bot]

Codecov Report

Attention: Patch coverage is 80.95238% with 4 lines in your changes missing coverage. Please review.

Project coverage is 63.61%. Comparing base (0759d3d) to head (288fc18).

Files with missing lines Patch % Lines
...om/swirlds/merkledb/MerkleDbDataSourceBuilder.java 33.33% 2 Missing and 2 partials :warning:
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop   #14695      +/-   ##
=============================================
- Coverage      63.62%   63.61%   -0.01%     
+ Complexity     20401    20399       -2     
=============================================
  Files           2537     2537              
  Lines          94754    94756       +2     
  Branches        9904     9905       +1     
=============================================
- Hits           60285    60280       -5     
- Misses         30863    30866       +3     
- Partials        3606     3610       +4     
Files with missing lines Coverage Δ
...b/src/main/java/com/swirlds/merkledb/MerkleDb.java 74.81% <100.00%> (+0.44%) :arrow_up:
...swirlds/merkledb/collections/AbstractLongList.java 92.03% <100.00%> (-0.04%) :arrow_down:
...com/swirlds/merkledb/collections/LongListDisk.java 88.41% <100.00%> (+0.14%) :arrow_up:
...com/swirlds/merkledb/collections/LongListHeap.java 97.87% <ø> (ø)
...wirlds/merkledb/files/hashmap/HalfDiskHashMap.java 74.80% <ø> (ø)
...java/com/swirlds/platform/util/BootstrapUtils.java 3.75% <ø> (ø)
...c/main/java/com/swirlds/virtualmap/VirtualMap.java 87.95% <100.00%> (ø)
...ds/virtualmap/internal/cache/VirtualNodeCache.java 67.71% <100.00%> (ø)
...ds/virtualmap/internal/merkle/VirtualRootNode.java 57.45% <100.00%> (ø)
...om/swirlds/merkledb/MerkleDbDataSourceBuilder.java 54.34% <33.33%> (-5.18%) :arrow_down:

... and 8 files with indirect coverage changes

Impacted file tree graph

codecov[bot] avatar Aug 22 '24 11:08 codecov[bot]

What do you think of limiting the PR changes only to services classes, and then other platform teams can handle changing the platform code? Is that a possibility?

@mhess-swl Any Services related changes were accidental and probably due to the config related changes that are already being addressed in https://github.com/hashgraph/hedera-services/pull/15562. The current PR is dealing with **/swirlds-tmp which is used by platform tests and platform classes such as LongListDisk. So I don't see value in Services specific PR since I don't think **/swirlds-tmp is used by Services tests.

MiroslavGatsanoga avatar Oct 24 '24 12:10 MiroslavGatsanoga

Configuration is now being passed to many files even though it is totally unused in those files. Why were these changes made?

poulok avatar Nov 08 '24 19:11 poulok

Closing this since the issue will be moved to Platform team.

MiroslavGatsanoga avatar Dec 12 '24 16:12 MiroslavGatsanoga