Skip to content

Commit e3cfe1d

Browse files
authored
Adding thread sleep before deleting resources in integ test (#236)
1 parent 91504e9 commit e3cfe1d

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

test/integration_tests/training/cli/test_gpu_quota_allocation.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ def test_create_job_with_integer_quota_parameters(self, test_job_name):
3737
]
3838

3939
result = execute_command(create_cmd)
40+
41+
# Wait a moment for the job to be created
42+
time.sleep(5)
43+
4044
assert result.returncode == 0
4145
assert "Using version: 1.1" in result.stdout
4246
logger.info(f"Successfully created job with required gpu quota parameters: {test_job_name}")
@@ -84,6 +88,10 @@ def test_create_job_with_float_quota_parameters(self, test_job_name):
8488
]
8589

8690
result = execute_command(create_cmd)
91+
92+
# Wait a moment for the job to be created
93+
time.sleep(5)
94+
8795
assert result.returncode == 0
8896
assert "Using version: 1.1" in result.stdout
8997
logger.info(f"Successfully created job with required gpu quota parameters: {test_job_name}")
@@ -126,6 +134,10 @@ def test_create_job_with_only_accelerators_parameter(self, test_job_name):
126134
]
127135

128136
result = execute_command(create_cmd)
137+
138+
# Wait a moment for the job to be created
139+
time.sleep(5)
140+
129141
assert result.returncode == 0
130142
assert "Using version: 1.1" in result.stdout
131143
logger.info(f"Successfully created job with required gpu quota parameters: {test_job_name}")
@@ -179,6 +191,10 @@ def test_create_job_with_accelerators_memory_parameters(self, test_job_name):
179191
"--namespace", NAMESPACE
180192
]
181193
result = execute_command(describe_cmd)
194+
195+
# Wait a moment for the job to be created
196+
time.sleep(5)
197+
182198
assert result.returncode == 0
183199
assert " Limits: {'memory': '2899102924800m', 'nvidia.com/gpu': '1'}" in result.stdout
184200
assert " Requests: {'cpu': '32', 'memory': '2040109465600m', 'nvidia.com/gpu': '1'}" in result.stdout

test/integration_tests/training/cli/test_topology.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def test_create_job_with_required_topology(self, test_job_name):
4141
"--namespace", NAMESPACE
4242
]
4343
result = execute_command(describe_cmd)
44+
45+
# Wait a moment for the job to be created
46+
time.sleep(5)
47+
4448
assert result.returncode == 0
4549
assert f"Annotations: {{'kueue.x-k8s.io/podset-required-topology': '{TOPOLOGY}'}}" in result.stdout
4650

0 commit comments

Comments
 (0)