File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -429,6 +429,16 @@ func mockAlluxioReportMetrics() string {
429429 return r
430430}
431431
432+ // TestAlluxioEngine_getGracefulShutdownLimits tests the getGracefulShutdownLimits method of the AlluxioEngine.
433+ // This test verifies the correct retrieval of graceful shutdown retry limits under different runtime configurations.
434+ // It covers three scenarios:
435+ // 1. When no CleanCachePolicy is specified, ensuring the default value (3) is returned.
436+ // 2. When CleanCachePolicy with MaxRetryAttempts is set, ensuring the configured value is returned.
437+ // 3. An error scenario where the runtime object might not be properly retrieved, testing error handling.
438+ // The test uses a fake Kubernetes client to simulate runtime object states and validate the method's behavior.
439+ //
440+ // Parameters:
441+ // - t: Testing handler for test reporting and control.
432442func TestAlluxioEngine_getGracefulShutdownLimits (t * testing.T ) {
433443 type fields struct {
434444 runtime * datav1alpha1.AlluxioRuntime
You can’t perform that action at this time.
0 commit comments