Skip to content

Commit bdb5b93

Browse files
committed
Merge branch 'main' of github.com:googleapis/python-storage into helpers
2 parents 842e5e2 + f7095fa commit bdb5b93

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

google/cloud/storage/_experimental/asyncio/async_appendable_object_writer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from typing import Optional, Union
2626

2727
from google_crc32c import Checksum
28+
from google.api_core import exceptions
2829

2930
from ._utils import raise_if_no_fast_crc32c
3031
from google.cloud import _storage_v2

tests/system/test_zonal.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,12 @@ async def test_basic_wrd(
120120
@pytest.mark.parametrize(
121121
"object_size",
122122
[
123-
20 * 1024 * 1024, # greater than _MAX_BUFFER_SIZE
123+
10, # less than _chunk size,
124+
10 * 1024 * 1024, # less than _MAX_BUFFER_SIZE_BYTES
125+
20 * 1024 * 1024, # greater than _MAX_BUFFER_SIZE_BYTES
124126
],
125127
)
126-
@pytest.mark.parametrize(
127-
"attempt_direct_path",
128-
[True],
129-
)
130-
async def test_basic_wrd_in_slices(
131-
storage_client, blobs_to_delete, attempt_direct_path, object_size
132-
):
128+
async def test_basic_wrd_in_slices(storage_client, blobs_to_delete, object_size):
133129
object_name = f"test_basic_wrd-{str(uuid.uuid4())}"
134130

135131
# Client instantiation; it cannot be part of fixture because.
@@ -142,7 +138,7 @@ async def test_basic_wrd_in_slices(
142138
# loop slowing down other tests.
143139
object_data = os.urandom(object_size)
144140
object_checksum = google_crc32c.value(object_data)
145-
grpc_client = AsyncGrpcClient(attempt_direct_path=attempt_direct_path).grpc_client
141+
grpc_client = AsyncGrpcClient().grpc_client
146142

147143
writer = AsyncAppendableObjectWriter(grpc_client, _ZONAL_BUCKET, object_name)
148144
await writer.open()

tests/unit/asyncio/test_async_appendable_object_writer.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -555,9 +555,6 @@ async def test_append_flushes_when_buffer_is_full(
555555
)
556556
async def test_append_handles_large_data(mock_write_object_stream, mock_client):
557557
"""Test that append handles data larger than the buffer size."""
558-
from google.cloud.storage._experimental.asyncio.async_appendable_object_writer import (
559-
_DEFAULT_FLUSH_INTERVAL_BYTES,
560-
)
561558

562559
writer = AsyncAppendableObjectWriter(mock_client, BUCKET, OBJECT)
563560
writer._is_stream_open = True

0 commit comments

Comments
 (0)