Skip to content

Commit 25af105

Browse files
authored
Stop potential race condition in test (#376)
If Groundlight is still processing an image query and the detector is deleted, it can lead to undefined behavior
1 parent b54e39d commit 25af105

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/integration/test_groundlight.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,8 @@ def test_delete_detector(gl: Groundlight):
885885
detector2 = gl.create_detector(name=name2, query=query, pipeline_config=pipeline_config)
886886
gl.submit_image_query(detector2, "test/assets/dog.jpeg")
887887

888+
time.sleep(10)
889+
888890
# Delete using detector ID string
889891
gl.delete_detector(detector2.id)
890892

0 commit comments

Comments
 (0)