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: In CI @HapiTests, use spec name as default memo #17870

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

Conversation

tinker-michaelj
Copy link
Contributor

@tinker-michaelj tinker-michaelj requested review from a team as code owners February 12, 2025 18:15
@tinker-michaelj tinker-michaelj added this to the v0.60 milestone Feb 12, 2025
@tinker-michaelj tinker-michaelj self-assigned this Feb 12, 2025
david-bakin-sl
david-bakin-sl previously approved these changes Feb 12, 2025
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.

LGTM (with one question for future reference!)

mhess-swl
mhess-swl previously approved these changes Feb 12, 2025
Copy link
Contributor

@mhess-swl mhess-swl left a comment

Choose a reason for hiding this comment

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

Brilliant idea, tyvm @tinker-michaelj! 🙌

Copy link

codacy-production bot commented Feb 12, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (0515075) 99458 72533 72.93%
Head commit (a468818) 99458 (+0) 72531 (-2) 72.93% (+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 (#17870) 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 Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #17870      +/-   ##
============================================
- Coverage     69.01%   69.01%   -0.01%     
+ Complexity    23050    23048       -2     
============================================
  Files          2655     2655              
  Lines         99675    99675              
  Branches      10289    10289              
============================================
- Hits          68795    68793       -2     
- Misses        26981    26983       +2     
  Partials       3899     3899              

see 1 file with indirect coverage changes

Impacted file tree graph

Signed-off-by: Michael Tinker <[email protected]>
Signed-off-by: Michael Tinker <[email protected]>
@tinker-michaelj tinker-michaelj requested review from a team as code owners February 15, 2025 15:11
Signed-off-by: Michael Tinker <[email protected]>
mhess-swl
mhess-swl previously approved these changes Feb 19, 2025
* <i>metadata</i> of nodes, but not the set of nodes itself; so pre-handle threads
* can use any version of the map to test for address book membership.)
*/
private Map<Long, NodeInfo> nodeInfos;
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest to make this field volatile. It probably does not matter because the pre-handle threads can use any version as you write, but it would make it more obvious that this field is accessed by multiple threads.

@@ -113,8 +120,7 @@ public boolean containsNode(final long nodeId) {

@Override
public void updateFrom(@NonNull final State state) {
nodeInfos.clear();
nodeInfos.putAll(nodeInfosFrom(state));
nodeInfos = nodeInfosFrom(state);
Copy link
Contributor

Choose a reason for hiding this comment

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

To play it safe, I think nodeInfosFrom() should return an unmodifiable Map. Wrapping the generated Map with Collections.unmodifiableMap() should be sufficient here.

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.

Use the @HapiTest name as default memo for involved transactions
6 participants