Skip to content

Commit 7ff1184

Browse files
authored
Add comments to TestAlluxioEngine_allocatePorts in pkg\ddc\alluxio\transform_test.go (#4537)
Signed-off-by: YaoPannju <984080885@qq.com>
1 parent 1178175 commit 7ff1184

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

pkg/ddc/alluxio/transform_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,16 @@ func TestAlluxioEngine_allocateSinglePort(t *testing.T) {
708708
}
709709
}
710710

711+
// Test function to test the allocatePorts functionality in the AlluxioEngine
712+
// It sets up the port range for allocation and initializes a port allocator
713+
// The test cases are structured with different input values and expected results
714+
// Fields include various configuration values for the Alluxio runtime and test setup
715+
// Args contain the allocated ports and Alluxio instance to be used in the test cases
716+
// Test case for setting properties in Alluxio runtime with given allocated ports
717+
// The test checks that the allocated ports are properly mapped to the expected ports
718+
// Initialize the AlluxioEngine instance with the test case fields.
719+
// Call allocatePorts to allocate ports and check for errors.
720+
// Check if the allocated APIGateway port matches the expected value.
711721
func TestAlluxioEngine_allocatePorts(t *testing.T) {
712722
pr := net.ParsePortRangeOrDie("20000-21000")
713723
err := portallocator.SetupRuntimePortAllocator(nil, pr, "bitmap", dummy)

0 commit comments

Comments
 (0)