From b1c1ecf186241b2bc5e9776a3e4e4faea5ed507b Mon Sep 17 00:00:00 2001 From: syhan32 <3387864993@qq.com> Date: Sat, 15 Mar 2025 23:09:04 +0800 Subject: [PATCH] Add Notation to Test_isPortInUsed in pkg\ddc\alluxio\utils_test.go. Signed-off-by: syhan32 <3387864993@qq.com> --- pkg/ddc/alluxio/utils_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/ddc/alluxio/utils_test.go b/pkg/ddc/alluxio/utils_test.go index 06483082640..9fe016d6aa3 100644 --- a/pkg/ddc/alluxio/utils_test.go +++ b/pkg/ddc/alluxio/utils_test.go @@ -179,6 +179,13 @@ func TestMountRootWithoutEnvSet(t *testing.T) { } } } + +// Test_isPortInUsed tests the functionality of the isPortInUsed function. +// This function checks whether a specified port is in the list of used ports. +// Test cases include: +// - Checking if a port is in the list of used ports. +// Each test case calls the isPortInUsed function and verifies if the returned value matches the expected result. +// If the returned value does not match the expected result, the test fails and outputs an error message. func Test_isPortInUsed(t *testing.T) { type args struct { port int