Skip to content

HDDS-15251. Move ScmInvokerCodeGenerator to test#10279

Draft
YutaLin wants to merge 1 commit into
apache:masterfrom
YutaLin:HDDS-15251-Move_ScmInvokerCodeGenerator_to_test
Draft

HDDS-15251. Move ScmInvokerCodeGenerator to test#10279
YutaLin wants to merge 1 commit 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.

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.

2 participants