Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/ddc/alluxio/operations/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ func TestAlluxioFileUtils_LoadMetadataWithoutTimeout(t *testing.T) {
}
}

// TestAlluxioFileUtils_LoadMetaData tests the AlluxioFileUtils.LoadMetaData method
// for both failure and success cases by mocking the internal exec command.
// It accepts a *testing.T and has no return value.
Comment on lines +181 to +183
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.

medium

The added comment is redundant and does not follow Go's idiomatic documentation style. Specifically, describing the function's parameters and return values (e.g., 'It accepts a *testing.T and has no return value') is unnecessary as this information is already evident from the signature. Documentation should focus on the behavior being tested or provide context that isn't obvious from the code.

Suggested change
// TestAlluxioFileUtils_LoadMetaData tests the AlluxioFileUtils.LoadMetaData method
// for both failure and success cases by mocking the internal exec command.
// It accepts a *testing.T and has no return value.
// TestAlluxioFileUtils_LoadMetaData tests AlluxioFileUtils.LoadMetaData
// for both failure and success cases by mocking the internal exec method.

func TestAlluxioFileUtils_LoadMetaData(t *testing.T) {
ExecCommon := func(a AlluxioFileUtils, command []string, verbose bool) (stdout string, stderr string, err error) {
return "Alluxio cluster summary", "", nil
Expand Down
Loading