Skip to content

Commit 8724901

Browse files
authored
[PLT-1572] Add wait for label processing for annotation upload tests (#1842)
1 parent 929ca7f commit 8724901

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.
@@ -129,6 +130,7 @@ def test_import_media_types(
129130
export_v2_test_helpers,
130131
helpers,
131132
media_type,
133+
wait_for_label_processing,
132134
):
133135
annotations_ndjson = list(
134136
itertools.chain.from_iterable(annotations_by_media_type[media_type])
@@ -145,6 +147,8 @@ def test_import_media_types(
145147
assert label_import.state == AnnotationImportState.FINISHED
146148
assert len(label_import.errors) == 0
147149

150+
wait_for_label_processing(configured_project)[0]
151+
148152
result = export_v2_test_helpers.run_project_export_v2_task(
149153
configured_project
150154
)

0 commit comments

Comments
 (0)