Skip to content

Commit df383e5

Browse files
author
Kevin Kim
committed
Fixing test_timeout_error
1 parent 0e48ad2 commit df383e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/integration/test_client_errors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ def test_semantic_error(client):
4242
assert excinfo.value.message.startswith("Cannot query field \"bbb\"")
4343

4444

45-
@pytest.mark.skip("failing with unreachable network")
4645
def test_timeout_error(client, project):
47-
time.sleep(60) #Fails to connect if we don't wait
4846
with pytest.raises(labelbox.exceptions.TimeoutError) as excinfo:
4947
query_str = """query getOntology {
5048
project (where: {id: $%s}) {
@@ -53,7 +51,9 @@ def test_timeout_error(client, project):
5351
}
5452
}
5553
} """ % (project.uid)
56-
client.execute(query_str, check_naming=False, timeout=0.01)
54+
55+
# Setting connect timeout to 30s, and read timeout to 0.01s
56+
client.execute(query_str, check_naming=False, timeout=(30.0, 0.01))
5757

5858

5959
def test_query_complexity_error(client):

0 commit comments

Comments
 (0)