Skip to content

Commit 82653c2

Browse files
authored
[Integ-Test] Fix test_dcv intermittent failure by filter running instance (#6547)
* Ensure the instance is in 'running' state before try to ssh it.
1 parent 955b244 commit 82653c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/integration-tests/tests/cloudwatch_logging/test_cloudwatch_logging.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ def _add_compute_instance(self, instance):
208208

209209
def _add_login_instance(self, instance):
210210
"""Update the cluster's log state by adding a login node."""
211+
# Ensure the instance is in 'running' state
212+
if instance.get("State", {}).get("Name") != "running":
213+
return
211214
login_hostname = self._run_command_on_head_node(
212215
"ssh -o StrictHostKeyChecking=no -q {} hostname -f".format(instance.get("PrivateDnsName"))
213216
)

0 commit comments

Comments
 (0)