From d2aaaab45968d6002f84b8e74e298dcbb0d13501 Mon Sep 17 00:00:00 2001 From: samsja Date: Mon, 17 Apr 2023 10:26:25 +0200 Subject: [PATCH 1/3] fix: fix push pull Signed-off-by: samsja --- docarray/array/doc_list/io.py | 4 ++-- docarray/store/jac.py | 6 +++--- tests/integrations/store/test_jac.py | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/docarray/array/doc_list/io.py b/docarray/array/doc_list/io.py index 16dca6a5bb0..1cace45a873 100644 --- a/docarray/array/doc_list/io.py +++ b/docarray/array/doc_list/io.py @@ -183,7 +183,7 @@ def _write_bytes( elif protocol in SINGLE_PROTOCOLS: f.write( b''.join( - self.to_binary_stream( + self._to_binary_stream( protocol=protocol, compress=compress, show_progress=show_progress, @@ -195,7 +195,7 @@ def _write_bytes( f'protocol={protocol} is not supported. Can be only {ALLOWED_PROTOCOLS}.' ) - def to_binary_stream( + def _to_binary_stream( self, protocol: str = 'protobuf', compress: Optional[str] = None, diff --git a/docarray/store/jac.py b/docarray/store/jac.py index 6dafb49839a..88caaf84dd2 100644 --- a/docarray/store/jac.py +++ b/docarray/store/jac.py @@ -102,7 +102,7 @@ def list(namespace: str = '', show_table: bool = False) -> List[str]: from rich.table import Table resp = HubbleClient(jsonify=True).list_artifacts( - filter={'type': 'DocumentArray'}, sort={'createdAt': 1} + filter={'type': 'documentArray'}, sort={'createdAt': 1} ) table = Table( @@ -186,7 +186,7 @@ def push( delimiter, ), 'name': name, - 'type': 'DocumentArray', + 'type': 'documentArray', 'public': public, 'metaData': json.dumps( { @@ -211,7 +211,7 @@ def push( def gen(): yield _head - binary_stream = docs.to_binary_stream( + binary_stream = docs._to_binary_stream( protocol='protobuf', compress='gzip', show_progress=show_progress ) while True: diff --git a/tests/integrations/store/test_jac.py b/tests/integrations/store/test_jac.py index 63dcdc33b15..91de5e3c4c8 100644 --- a/tests/integrations/store/test_jac.py +++ b/tests/integrations/store/test_jac.py @@ -13,8 +13,6 @@ TOLERANCE_RATIO = 0.5 # Percentage of difference allowed in stream vs non-stream test RANDOM: str = uuid.uuid4().hex[:8] -pytestmark = [pytest.mark.skip] - @pytest.fixture(scope='session', autouse=True) def testing_namespace_cleanup(): From 4fb282b419e66231d02bc9166b5fe46264ddd5b2 Mon Sep 17 00:00:00 2001 From: samsja Date: Mon, 17 Apr 2023 11:48:06 +0200 Subject: [PATCH 2/3] fix: fix test Signed-off-by: samsja --- tests/integrations/store/test_jac.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/integrations/store/test_jac.py b/tests/integrations/store/test_jac.py index 91de5e3c4c8..3dbe97ed35f 100644 --- a/tests/integrations/store/test_jac.py +++ b/tests/integrations/store/test_jac.py @@ -66,6 +66,7 @@ def test_pushpull_correct(capsys): assert len(captured.err) == 0, 'No error should be printed when show_progress=False' +@pytest.mark.skip(reason='time out') @pytest.mark.slow @pytest.mark.internet def test_pushpull_stream_correct(capsys): @@ -97,6 +98,7 @@ def test_pushpull_stream_correct(capsys): assert len(captured.err) == 0, 'No error should be printed when show_progress=False' +@pytest.mark.skip(reason='time out') @pytest.mark.slow @pytest.mark.internet def test_pull_stream_vs_pull_full(): @@ -153,9 +155,9 @@ def get_total_full(url: str): ), 'Full pull memory usage should be dependent on the size of the data' +# @pytest.mark.skip(reason='The CI account might be broken') @pytest.mark.slow @pytest.mark.internet -@pytest.mark.skip(reason='The CI account might be broken') def test_list_and_delete(): DA_NAME_0 = f'test{RANDOM}-list-and-delete-da0' DA_NAME_1 = f'test{RANDOM}-list-and-delete-da1' @@ -210,6 +212,7 @@ def test_list_and_delete(): ), 'Deleting a non-existent DA should return False' +@pytest.mark.skip(reason='time out') @pytest.mark.slow @pytest.mark.internet def test_concurrent_push_pull(): From a2bcfb37ad3b954e30137de1b343bfcf32949603 Mon Sep 17 00:00:00 2001 From: samsja Date: Mon, 17 Apr 2023 11:56:26 +0200 Subject: [PATCH 3/3] fix: skip broken test Signed-off-by: samsja --- tests/integrations/store/test_jac.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integrations/store/test_jac.py b/tests/integrations/store/test_jac.py index 3dbe97ed35f..13f338acc5e 100644 --- a/tests/integrations/store/test_jac.py +++ b/tests/integrations/store/test_jac.py @@ -155,7 +155,7 @@ def get_total_full(url: str): ), 'Full pull memory usage should be dependent on the size of the data' -# @pytest.mark.skip(reason='The CI account might be broken') +@pytest.mark.skip(reason='The CI account might be broken') @pytest.mark.slow @pytest.mark.internet def test_list_and_delete():