Skip to content
Merged
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
7 changes: 7 additions & 0 deletions pkg/ddc/alluxio/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,13 @@ func TestAlluxioEngine_getGracefulShutdownLimits(t *testing.T) {
}
}

// TestAlluxioEngine_getCleanCacheGracePeriodSeconds verifies the behavior of
// the AlluxioEngine.getCleanCacheGracePeriodSeconds() method.
// It covers the following scenarios:
// 1. When no CleanCachePolicy is defined in the runtime spec, the method should return the default value (60 seconds).
// 2. When GracePeriodSeconds is explicitly set in CleanCachePolicy, the method should return the configured value.
// 3. When the runtime object is not found or the GracePeriodSeconds is not defined properly, it should return an error.
// The test uses a fake Kubernetes client initialized with deep-copied runtime objects to simulate the environment.
func TestAlluxioEngine_getCleanCacheGracePeriodSeconds(t *testing.T) {
type fields struct {
runtime *datav1alpha1.AlluxioRuntime
Expand Down
Loading