hiero-ledger / hiero-ledger/hiero-consensus-node

Consolidate repeated overrides into sensibly-placed test classes

Open
#14,723 0 comments 0 reactions 0 assignees View on GitHub
HapiThursday
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

### Problem

The current set of `@HapiTest`s are not compliant with the [checklist](https://github.com/hashgraph/hedera-services/blob/develop/hedera-node/test-clients/README.md#the-hapitest-checklist) guideline that says,
> If the test leaks property overrides, there is no other `@LeakyHapiTest` in the entire module that leaks the exact same property overrides; if so, all such tests are grouped in a single test class that uses `@BeforeAll` and `@AfterAll` to manage the shared overrides and replaces the leaky annotations with `@HapiTest`.

A particularly bad offender is the [`FileUpdateSuite`](https://github.com/hashgraph/hedera-services/blob/develop/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/file/FileUpdateSuite.java#L118) test class, which in a much earlier stage of the product became a catch-call home for leaky tests.

### Solution

Systematically group and refactor `@LeakyHapiTest`s to make the `test-clients` module compliant with the style guide.

### Alternatives

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the test-clients README HapiTest checklist and inspect FileUpdateSuite.java, especially the leaky tests around the referenced location. Search the test-clients module for repeated @LeakyHapiTest property overrides, then group matching tests into sensibly placed classes using the stated lifecycle pattern. Done means the module complies with the checklist and no duplicate override groups remain.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.