diff options
author | Martin Polden <mpolden@mpolden.no> | 2022-01-25 15:28:12 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2022-01-25 15:35:48 +0100 |
commit | 97c399fbddd740f47163e04a1862b1dd90f92f9c (patch) | |
tree | 0b54986711a54ebc91026df89af62e6adf71d21d /client/go/cmd/query_test.go | |
parent | a2873ebedbbdb9daacdd87517ea3b9fa21794d26 (diff) |
Set a default query timeout
Diffstat (limited to 'client/go/cmd/query_test.go')
-rw-r--r-- | client/go/cmd/query_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/client/go/cmd/query_test.go b/client/go/cmd/query_test.go index 55046ae49ba..57c309c8cb3 100644 --- a/client/go/cmd/query_test.go +++ b/client/go/cmd/query_test.go @@ -13,25 +13,25 @@ import ( func TestQuery(t *testing.T) { assertQuery(t, - "?yql=select+from+sources+%2A+where+title+contains+%27foo%27", + "?timeout=10s&yql=select+from+sources+%2A+where+title+contains+%27foo%27", "select from sources * where title contains 'foo'") } func TestQueryNonJsonResult(t *testing.T) { assertQuery(t, - "?yql=select+from+sources+%2A+where+title+contains+%27foo%27", + "?timeout=10s&yql=select+from+sources+%2A+where+title+contains+%27foo%27", "select from sources * where title contains 'foo'") } func TestQueryWithMultipleParameters(t *testing.T) { assertQuery(t, - "?hits=5&yql=select+from+sources+%2A+where+title+contains+%27foo%27", - "select from sources * where title contains 'foo'", "hits=5") + "?hits=5&timeout=20s&yql=select+from+sources+%2A+where+title+contains+%27foo%27", + "select from sources * where title contains 'foo'", "hits=5", "timeout=20s") } func TestQueryWithExplicitYqlParameter(t *testing.T) { assertQuery(t, - "?yql=select+from+sources+%2A+where+title+contains+%27foo%27", + "?timeout=10s&yql=select+from+sources+%2A+where+title+contains+%27foo%27", "yql=select from sources * where title contains 'foo'") } |