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

chore: Refactor hapi tests to use hapiTest(...) instead of defaultHapiSpec(...) (Part 3) #16698

Merged
merged 19 commits into from
Dec 23, 2024

Conversation

mhess-swl
Copy link
Contributor

This PR continues the work for replacing defaultHapiSpec(...) with hapiTest(...). There should be no change to any test conditions.

Part of #16494

Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>
Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>
Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>
Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>
@mhess-swl mhess-swl added this to the v0.57 milestone Nov 20, 2024
@mhess-swl mhess-swl self-assigned this Nov 20, 2024
@mhess-swl mhess-swl requested review from a team as code owners November 20, 2024 23:27
@mhess-swl mhess-swl requested a review from netopyr November 20, 2024 23:27
Copy link

codacy-production bot commented Nov 20, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.06% (target: -1.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (1f6a473) 95473 64901 67.98%
Head commit (ac38769) 95656 (+183) 65079 (+178) 68.03% (+0.06%)

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 (#16698) 0 0 ∅ (not applicable)

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

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.27%. Comparing base (1f6a473) to head (ac38769).
Report is 24 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #16698      +/-   ##
============================================
+ Coverage     64.24%   64.27%   +0.03%     
- Complexity    20816    20882      +66     
============================================
  Files          2547     2549       +2     
  Lines         95710    95976     +266     
  Branches      10014    10043      +29     
============================================
+ Hits          61485    61687     +202     
- Misses        30618    30655      +37     
- Partials       3607     3634      +27     

see 103 files with indirect coverage changes

Impacted file tree graph

Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>

# Conflicts:
#	hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip423/DisabledLongTermExecutionScheduleTest.java
#	hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip423/ScheduleLongTermExecutionTest.java
#	hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip423/ScheduleLongTermSignTest.java
Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>

# Conflicts:
#	hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip423/ScheduleLongTermExecutionTest.java
#	hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip423/ScheduleLongTermSignTest.java
Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>

# Conflicts:
#	hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/hip869/NodeDeleteTest.java
Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>
@mhess-swl
Copy link
Contributor Author

The JRS failure looks like a network hiccup, unable to connect to the node (which seemed to succeed on the next attempt). The codacy errors are from the tests themselves, not from the changes I made.

petreze
petreze previously approved these changes Dec 16, 2024
Copy link
Contributor

@david-bakin-sl david-bakin-sl left a comment

Choose a reason for hiding this comment

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

Taking a break. Got through meta/VersionInfoSpec. Will return later.

BTW - some comments made on tests later determined not to be "CI" tests but instead "JRS" tests. The ones about no @HapiTest annotation, you'll recognized them. So ignore that.

Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>
david-bakin-sl
david-bakin-sl previously approved these changes Dec 16, 2024
Copy link
Contributor

@david-bakin-sl david-bakin-sl left a comment

Choose a reason for hiding this comment

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

Finished - LGTM!

vtronkov
vtronkov previously approved these changes Dec 17, 2024
@mhess-swl mhess-swl dismissed stale reviews from vtronkov and david-bakin-sl via 97c8b9b December 18, 2024 16:17
@mhess-swl mhess-swl requested review from a team as code owners December 18, 2024 16:17
Copy link
Contributor

@anthony-swirldslabs anthony-swirldslabs left a comment

Choose a reason for hiding this comment

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

There's no any platform-owned code in this PR, and I don't have a sufficient expertise in these particular tests or area to validate the changes. I'm unsure why GitHub requested a review from platform teams here.

However, I skimmed through the diff and didn't notice anything suspicious in the code changes themselves. From Java perspective, they look good to me. So, approving.

Please do get an expert in this area to review the fix though.

vtronkov
vtronkov previously approved these changes Dec 19, 2024
Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>
Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>
Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>
Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>
vtronkov
vtronkov previously approved these changes Dec 20, 2024
Copy link
Contributor

@vtronkov vtronkov left a comment

Choose a reason for hiding this comment

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

Do you know why NodeOpsForUpgrade and other JRS tests were failing when hapiTest was used?

@mhess-swl
Copy link
Contributor Author

Do you know why NodeOpsForUpgrade and other JRS tests were failing when hapiTest was used?

No idea. Using hapiTest shouldn't make any difference, yet I consistently see errors like this:

Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: localhost/127.0.0.1:50211
Caused by: java.net.ConnectException: finishConnect(..) failed: Connection refused

Signed-off-by: Neeharika-Sompalli <neeharika.sompalli@swirldslabs.com>
@Neeharika-Sompalli
Copy link
Contributor

Do you know why NodeOpsForUpgrade and other JRS tests were failing when hapiTest was used?

These are run with SuiteRunner in JRS. We need to see if there is a connection. Need to validate these tests run still fine with SuiteRunner

Signed-off-by: Matt Hess <matt.hess@swirldslabs.com>
@mhess-swl mhess-swl requested a review from vtronkov December 20, 2024 22:18
Signed-off-by: Neeharika-Sompalli <neeharika.sompalli@swirldslabs.com>
Copy link
Contributor

@Neeharika-Sompalli Neeharika-Sompalli left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @mhess-swl

@Neeharika-Sompalli Neeharika-Sompalli merged commit fe64ed3 into main Dec 23, 2024
45 of 46 checks passed
@Neeharika-Sompalli Neeharika-Sompalli deleted the 16494-remove-given-when-then-pt3 branch December 23, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants