Skip to content

Commit f18d610

Browse files
vbrodskyVal Brodsky
authored andcommitted
[PLT-1572] Add wait for label processing for annotation upload tests (#1842)
1 parent 5e2304b commit f18d610

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

libs/labelbox/tests/data/annotation_import/test_generic_data_types.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
import datetime
2+
import itertools
3+
import uuid
4+
5+
import pytest
6+
7+
import labelbox as lb
8+
from labelbox import Client, OntologyKind, Project
9+
from labelbox.data.annotation_types import Label
210
from labelbox.data.annotation_types.data.generic_data_row_data import (
311
GenericDataRowData,
412
)
513
from labelbox.data.serialization.ndjson.converter import NDJsonConverter
6-
from labelbox.data.annotation_types import Label
7-
import pytest
8-
import uuid
9-
10-
import labelbox as lb
11-
from labelbox.schema.media_type import MediaType
1214
from labelbox.schema.annotation_import import AnnotationImportState
13-
from labelbox import Project, Client, OntologyKind
14-
import itertools
15+
from labelbox.schema.media_type import MediaType
1516

1617
"""
1718
- integration test for importing mal labels and ground truths with each supported MediaType.
@@ -57,6 +58,7 @@ def test_import_media_types(
5758
export_v2_test_helpers,
5859
helpers,
5960
media_type,
61+
wait_for_label_processing,
6062
):
6163
annotations_ndjson = list(
6264
itertools.chain.from_iterable(annotations_by_media_type[media_type])
@@ -73,6 +75,8 @@ def test_import_media_types(
7375
assert label_import.state == AnnotationImportState.FINISHED
7476
assert len(label_import.errors) == 0
7577

78+
wait_for_label_processing(configured_project)[0]
79+
7680
result = export_v2_test_helpers.run_project_export_v2_task(
7781
configured_project
7882
)

0 commit comments

Comments
 (0)