Skip to content
Closed
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions pkg/ddc/alluxio/transform_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ func (e *AlluxioEngine) transformResourcesForMaster(runtime *datav1alpha1.Alluxi
}

// transformResourcesForWorker is responsible for transforming and setting resource limits for the Alluxio Worker component.
// This function updates the resource requirements for the Worker and JobWorker based on the runtime configuration
// This function updates the resource requirements for the Worker and JobWorker based on the runtime configuration
// and ensures that memory requests meet the required constraints.
//
// Parameters:
// - runtime: *datav1alpha1.AlluxioRuntime, the runtime configuration of Alluxio, including resource definitions
// - runtime: *datav1alpha1.AlluxioRuntime, the runtime configuration of Alluxio, including resource definitions
// for Worker and JobWorker.
// - value: *Alluxio, the Alluxio runtime instance used to store the transformed resource information.
//
//
// Return value:
// - error: Returns an error if any issue occurs during resource transformation; otherwise, returns nil.
func (e *AlluxioEngine) transformResourcesForWorker(runtime *datav1alpha1.AlluxioRuntime, value *Alluxio) error {
Expand Down
4 changes: 2 additions & 2 deletions pkg/ddc/jindo/dataset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ func TestUpdateDatasetStatus(t *testing.T) {
}
}

// TestBindToDataset tests the BindToDataset method of JindoEngine to verify whether it can correctly bind the dataset to the runtime
// and update the dataset's cache state and HCFS status. The test creates mock Dataset and JindoRuntime objects,
// TestBindToDataset tests the BindToDataset method of JindoEngine to verify whether it can correctly bind the dataset to the runtime
// and update the dataset's cache state and HCFS status. The test creates mock Dataset and JindoRuntime objects,
// uses a fake client to simulate operations, and finally checks if the dataset's Phase, CacheStates, and HCFSStatus match the expected results.
func TestBindToDataset(t *testing.T) {
testDatasetInputs := []*datav1alpha1.Dataset{
Expand Down
2 changes: 1 addition & 1 deletion pkg/ddc/juicefs/datasetinfo_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func TestGetFSInfoFromConfigMap(t *testing.T) {
}

// Test_parseFSInfoFromConfigMap is a unit test function for the parseFSInfoFromConfigMap method.
// It validates whether the function correctly extracts and parses dataset information
// It validates whether the function correctly extracts and parses dataset information
// from a given Kubernetes ConfigMap.
//
// Steps:
Expand Down
7 changes: 7 additions & 0 deletions pkg/ddc/juicefs/runtime_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ func newJuiceFSEngineRT(client client.Client, name string, namespace string, wit
return engine
}

// newJuiceFSEngineRT creates a new instance of JuiceFSEngine
// client: Kubernetes client
// name: Name of the engine
// namespace: Namespace where the engine resides
// withRuntimeInfo: Whether to include runtime information
// unittest: Whether it is for unit testing
// Returns: A new instance of JuiceFSEngine
func TestJuiceFSEngine_getRuntimeInfo(t *testing.T) {
runtimeInputs := []*datav1alpha1.JuiceFSRuntime{
{
Expand Down