You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/spec/Feature/Query/PreferencesSpec.hs
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -236,3 +236,15 @@ spec =
236
236
`shouldRespondWith`
237
237
[json| {"code":"PGRST128","details":null,"hint":null,"message":"Function must return SETOF or TABLE when max-affected preference is used with handling=strict"} |]
238
238
{ matchStatus =400 }
239
+
240
+
-- Prefer: Timeout
241
+
context "test Prefer: timeout with handling=strict"$
242
+
it "should fail when timeout is more than the query time"$
243
+
request methodGet "/rpc/sleep?seconds=5"
244
+
[("Prefer", "timeout=4, handling=strict")]
245
+
""
246
+
`shouldRespondWith`
247
+
[json| {"code":"57014","details":null,"hint":null,"message":"canceling statement due to statement timeout"} |]
248
+
{ matchStatus =500
249
+
, matchHeaders = [ matchContentTypeJson ] -- Should this have Preference-Applied?
0 commit comments