diff --git a/sdks/python/apache_beam/ml/transforms/base_test.py b/sdks/python/apache_beam/ml/transforms/base_test.py index df5bf826742e..1a21f6caf7e1 100644 --- a/sdks/python/apache_beam/ml/transforms/base_test.py +++ b/sdks/python/apache_beam/ml/transforms/base_test.py @@ -17,8 +17,10 @@ # pytype: skip-file import os +import secrets import shutil import tempfile +import time import typing import unittest from collections.abc import Sequence @@ -699,7 +701,7 @@ def test_mltransform_to_ptransform_wrapper(self): @unittest.skipIf(apiclient is None, 'apache_beam[gcp] is not installed.') def test_with_gcs_location_with_none_options(self): - path = 'gs://fake_path' + path = f"gs://fake_path_{secrets.token_hex(3)}_{int(time.time())}" with self.assertRaises(RuntimeError): self.attribute_manager.save_attributes( ptransform_list=[], artifact_location=path, options=None)