Skip to content

Commit 67ec873

Browse files
authored
[Automation] Fix system test by removing redundant deployment (#9192)
1 parent 130df4d commit 67ec873

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

tests/system/runtimes/test_application.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,6 @@ def test_application_probes(self):
199199
self._upload_code_to_cluster()
200200
self._logger.debug("Creating application")
201201
function = self._create_delay_health_check_application("delay-health-check-app")
202-
self._logger.debug("Deploying application with readiness probe (will fail)")
203-
# The deployment should fail because the readiness probe have default timeout_seconds
204-
# and the /health endpoint sleeps for 20 seconds, causing the probe to timeout
205-
with pytest.raises(mlrun.runtimes.utils.RunError, match="deployment failed"):
206-
function.deploy(with_mlrun=False)
207-
208202
# Add probes to the function - set timeout_seconds > 20 to allow health endpoint to respond
209203
self._logger.debug("Adding probes to function")
210204
function.set_probe(
@@ -215,8 +209,8 @@ def test_application_probes(self):
215209
timeout_seconds=25, # Wait 25 seconds (more than the 20 seconds sleep in /health)
216210
)
217211

218-
# Redeploy with probes
219-
self._logger.debug("Redeploying application with probes")
212+
# Deploy with probes
213+
self._logger.debug("Deploying application with probes")
220214
function.deploy(with_mlrun=False)
221215

222216
# Verify the application is running and healthy
@@ -284,11 +278,4 @@ def _create_delay_health_check_application(self, name="delay-app"):
284278
self.remote_code_dir, self._function_with_delay_healthcheck
285279
)
286280
function.with_source_archive(source=delay_healthcheck_source)
287-
function.spec.config["spec.sidecars"] = [
288-
{
289-
"name": f"{function.metadata.name}-sidecar",
290-
"readinessProbe": {"httpGet": {"path": "/health", "port": 5000}},
291-
}
292-
]
293-
294281
return function

0 commit comments

Comments
 (0)