Skip to content

Commit e01f8b5

Browse files
authored
[PLT-0] fix flaky TestDataRowUpsert::test_multiple_chunks (#1536)
1 parent 4b3b765 commit e01f8b5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libs/labelbox/tests/integration/test_data_rows_upsert.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,11 @@ def test_multiple_chunks(self, client, dataset, image_url):
221221
first_call_args, _ = spy_some_function.call_args_list[0]
222222
first_chunk_content = first_call_args[0]
223223
data = json.loads(first_chunk_content)
224-
assert len(data) == mocked_chunk_size
224+
"""
225+
Each chunk but the last will have 3 items, the last will have 1.
226+
As the chunks are processed async, we cannot be sure of the order of the calls.
227+
"""
228+
assert len(data) in {1, 3}
225229

226230
last_call_args, _ = spy_some_function.call_args_list[-1]
227231
manifest_content = last_call_args[0].decode('utf-8')

0 commit comments

Comments
 (0)