Skip to content

Conversation

@ArafatKhan2198
Copy link
Contributor

What changes were proposed in this pull request?

The structure of TestNSSummaryTaskWithLegacy is nested, with separate inner classes for each "process" and "reprocess" scenario. This differs from the design of other test classes, such as TestFileSizeCountTask, TestContainerSizeCountTask, and TestContainerKeyMapperTask, which consolidate these scenarios for the sake of code simplicity.

As a result of this nested structure, the inner classes rely on the setup method of the outer class. This creates a problem because, due to its dependencies on other test classes, it cannot execute independently. Consequently, a NullPointerException (NPE) error occurs because some instances are not properly initialized.

To address this issue, we have considered refactoring the class to follow a pattern similar to other test classes that are not nested, thereby eliminating the dependency on the outer class's setup method.

What is the link to the Apache JIRA

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

How was this patch tested?

The test cases passed correctly

@adoroszlai
Copy link
Contributor

Thanks @ArafatKhan2198 for working on this. Please see #5283 for a solution that keeps the nested test structure.

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