Skip to content

Commit e3948fa

Browse files
damccormclaudevdmClaude
authored
Use random gcs bucket name (#33151) (#33158)
* Use random gcs bucket name * Linter fixes --------- Co-authored-by: claudevdm <[email protected]> Co-authored-by: Claude <[email protected]>
1 parent b201f20 commit e3948fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdks/python/apache_beam/ml/transforms/base_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
# pytype: skip-file
1818

1919
import os
20+
import secrets
2021
import shutil
2122
import tempfile
23+
import time
2224
import typing
2325
import unittest
2426
from collections.abc import Sequence
@@ -699,7 +701,7 @@ def test_mltransform_to_ptransform_wrapper(self):
699701

700702
@unittest.skipIf(apiclient is None, 'apache_beam[gcp] is not installed.')
701703
def test_with_gcs_location_with_none_options(self):
702-
path = 'gs://fake_path'
704+
path = f"gs://fake_path_{secrets.token_hex(3)}_{int(time.time())}"
703705
with self.assertRaises(RuntimeError):
704706
self.attribute_manager.save_attributes(
705707
ptransform_list=[], artifact_location=path, options=None)

0 commit comments

Comments
 (0)