Skip to content

Commit 226944a

Browse files
Merge pull request #727 from Labelbox/kkim/wait-for-label-export
[AL-0] Add sleep before label exporter
2 parents 6c19656 + 1f085ed commit 226944a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tests/integration/test_export.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from time import sleep
12
import uuid
23

34
from labelbox.data.annotation_types.annotation import ObjectAnnotation
@@ -46,6 +47,8 @@ def test_export_annotations_nested_checklist(
4647
task = LabelImport.create_from_objects(client, project.uid,
4748
f'label-import-{uuid.uuid4()}', data)
4849
task.wait_until_done()
50+
# Wait for exporter to retrieve latest labels
51+
sleep(10)
4952
labels = project.label_generator().as_list()
5053
object_annotation = [
5154
annot for annot in next(labels).annotations

tests/integration/test_label.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ def test_labels(configured_project_with_label):
3131
def test_label_export(configured_project_with_label):
3232
project, _, _, label = configured_project_with_label
3333
label_id = label.uid
34+
# Wait for exporter to retrieve latest labels
35+
time.sleep(10)
3436

3537
exported_labels_url = project.export_labels()
3638
assert exported_labels_url is not None

0 commit comments

Comments
 (0)