Skip to content

HDDS-15251. Move ScmInvokerCodeGenerator to test#10279

Merged
adoroszlai merged 5 commits into
apache:masterfrom
YutaLin:HDDS-15251-Move_ScmInvokerCodeGenerator_to_test
May 20, 2026
Merged

HDDS-15251. Move ScmInvokerCodeGenerator to test#10279
adoroszlai merged 5 commits into
apache:masterfrom
YutaLin:HDDS-15251-Move_ScmInvokerCodeGenerator_to_test

Conversation

@YutaLin
Copy link
Copy Markdown
Contributor

@YutaLin YutaLin commented May 15, 2026

What changes were proposed in this pull request?

Sonarcloud reports that ScmInvokerCodeGenerator has zero test coverage, while it does not require any tests (the generated code does). Let move it to tests.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15251

How was this patch tested?

CI

Copy link
Copy Markdown
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

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

@YutaLin , thanks for working on this!

Comment on lines -79 to -81
static void main(String[] args) {
ScmInvokerCodeGenerator.generate(DeletedBlockLogStateManager.class, true);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's add the code somewhere in test. We may have a new class below

class ScmInvokerCodeGeneratorMains {
  static class GenerateDeletedBlockLogStateManager {
    static void main(String[] args) {
      ScmInvokerCodeGenerator.generate(DeletedBlockLogStateManager.class, true);
    }
  }

}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi @szetszwo thanks for the review!
Could you help me review #10252 first since it's related to this.

@YutaLin
Copy link
Copy Markdown
Contributor Author

YutaLin commented May 19, 2026

HI @szetszwo
Thanks for the review! I've made change base on feedback #10252 and above. Please help me review again, thanks!

@YutaLin YutaLin requested a review from szetszwo May 19, 2026 20:33
Copy link
Copy Markdown
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

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

+1 the change looks good.

@YutaLin YutaLin marked this pull request as ready for review May 19, 2026 22:53
@adoroszlai adoroszlai merged commit b751f88 into apache:master May 20, 2026
61 checks passed
@adoroszlai
Copy link
Copy Markdown
Contributor

Thanks @YutaLin for the patch, @szetszwo for the review.

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.

3 participants