File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -877,6 +877,21 @@ def wait_for_dsci_status_ready(dsci_resource: DSCInitialization) -> bool:
877877 )
878878
879879
880+ @retry (
881+ wait_timeout = 120 ,
882+ sleep = 5 ,
883+ exceptions_dict = {ResourceNotReadyError : []},
884+ )
885+ def wait_for_dsci_status_ready (dsci_resource : DSCInitialization ) -> bool :
886+ LOGGER .info (f"Wait for DSCI { dsci_resource .name } to be in { dsci_resource .Status .READY } status." )
887+ if dsci_resource .status == dsci_resource .Status .READY :
888+ return True
889+
890+ raise ResourceNotReadyError (
891+ f"DSCI { dsci_resource .name } is not ready.\n Current status: { dsci_resource .instance .status } "
892+ )
893+
894+
880895@retry (
881896 wait_timeout = 120 ,
882897 sleep = 5 ,
@@ -929,7 +944,6 @@ def verify_cluster_sanity(
929944 wait_for_dsci_status_ready (dsci_resource = dsci_resource )
930945 wait_for_dsc_status_ready (dsc_resource = dsc_resource )
931946
932-
933947 except (ResourceNotReadyError , NodeUnschedulableError , NodeNotReadyError ) as ex :
934948 error_msg = f"Cluster sanity check failed: { str (ex )} "
935949 # return_code set to 99 to not collide with https://docs.pytest.org/en/stable/reference/exit-codes.html
You can’t perform that action at this time.
0 commit comments