diff --git a/samples/snippets/quickstart_batchgetassetshistory_test.py b/samples/snippets/quickstart_batchgetassetshistory_test.py index fd7622c1..1bb483eb 100644 --- a/samples/snippets/quickstart_batchgetassetshistory_test.py +++ b/samples/snippets/quickstart_batchgetassetshistory_test.py @@ -30,12 +30,12 @@ @pytest.fixture(scope="module") def storage_client(): - yield storage.Client() + yield storage.Client(project=PROJECT) @pytest.fixture(scope="module") def asset_bucket(storage_client): - bucket = storage_client.create_bucket(BUCKET) + bucket = storage_client.create_bucket(BUCKET, project=PROJECT) yield BUCKET @@ -52,7 +52,7 @@ def test_batch_get_assets_history(asset_bucket, capsys): bucket_asset_name, ] - @backoff.on_exception(backoff.expo, (AssertionError, InvalidArgument), max_time=30) + @backoff.on_exception(backoff.expo, (AssertionError, InvalidArgument), max_time=60) def eventually_consistent_test(): quickstart_batchgetassetshistory.batch_get_assets_history(PROJECT, asset_names) out, _ = capsys.readouterr() diff --git a/samples/snippets/quickstart_searchallresources_test.py b/samples/snippets/quickstart_searchallresources_test.py index f27eeb3b..da019752 100644 --- a/samples/snippets/quickstart_searchallresources_test.py +++ b/samples/snippets/quickstart_searchallresources_test.py @@ -53,7 +53,7 @@ def test_search_all_resources(asset_dataset, capsys): # Dataset creation takes some time to propagate, so the dataset is not # immediately searchable. Need some time before the snippet will pass. - @backoff.on_exception(backoff.expo, (AssertionError), max_time=120) + @backoff.on_exception(backoff.expo, (AssertionError), max_time=240) def eventually_consistent_test(): quickstart_searchallresources.search_all_resources(scope, query=query) out, _ = capsys.readouterr()