From 7b5d1af777ef8a1485558a0dd1b88b7f2b325dc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E9=BA=92=E6=B7=9E?= <231220137@nju.edu.cn> Date: Wed, 17 Jun 2026 01:40:10 +0800 Subject: [PATCH] Add comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王麒淞 <231220137@nju.edu.cn> --- pkg/ddc/alluxio/operations/base_test.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/ddc/alluxio/operations/base_test.go b/pkg/ddc/alluxio/operations/base_test.go index b90594e32cd..e8d662db8bd 100644 --- a/pkg/ddc/alluxio/operations/base_test.go +++ b/pkg/ddc/alluxio/operations/base_test.go @@ -344,7 +344,15 @@ func TestAlluxioFIleUtils_Mount(t *testing.T) { } } } - +// TestAlluxioFileUtils_IsMounted tests the IsMounted method of AlluxioFileUtils. +// It verifies the method's ability to correctly determine whether a given Alluxio +// path is mounted by parsing the output of the underlying alluxio fs mount command. +// +// Test cases: +// - ExecErr: Tests handling of command execution errors, ensuring an error is +// returned when the exec command fails. +// - /spark: Tests a non-existent mount path, expecting false. +// - /hbase: Tests an existing mount path, expecting true. func TestAlluxioFileUtils_IsMounted(t *testing.T) { ExecCommon := func(a AlluxioFileUtils, command []string, verbose bool) (stdout string, stderr string, err error) { return "https://mirrors.bit.edu.cn/apache/hbase/stable on /hbase (web, capacity=-1B, used=-1B, read-only, not shared, properties={}) \n /underFSStorage on / (local, capacity=0B, used=0B, not read-only, not shared, properties={})", "", nil