Skip to content

Commit f474fe8

Browse files
sararobcopybara-github
authored andcommitted
chore: fix cleanup issue in system tests
PiperOrigin-RevId: 509595196
1 parent 2842389 commit f474fe8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/system/aiplatform/e2e_base.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,9 @@ def tear_down_resources(self, shared_state: Dict[str, Any]):
204204

205205
# When an Experiment has a backing_tensorboard, the Experiment needs to be deleted first
206206
# This is used by the autologging tests
207-
for resource in shared_state["tensorboard"]:
208-
try:
209-
resource.delete()
210-
except exceptions.GoogleAPIError as e:
211-
logging.error(f"Could not delete resource: {resource} due to: {e}")
207+
if "tensorboard" in shared_state:
208+
for resource in shared_state["tensorboard"]:
209+
try:
210+
resource.delete()
211+
except exceptions.GoogleAPIError as e:
212+
logging.error(f"Could not delete resource: {resource} due to: {e}")

0 commit comments

Comments
 (0)