William Lallemand | 4ed0a3a | 2022-10-20 11:23:02 +0200 | [diff] [blame] | 1 | varnishtest "Lua: test the httpclient when the lua action timeout" |
| 2 | # |
| 3 | # Start an httpclient from "lua.test" whose lua task will expire before the |
| 4 | # httpclient is ended. |
| 5 | |
| 6 | |
| 7 | feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.5-dev7)'" |
| 8 | feature ignore_unknown_macro |
| 9 | |
| 10 | #REQUIRE_OPTIONS=LUA |
| 11 | |
| 12 | haproxy h1 -conf { |
| 13 | |
| 14 | global |
| 15 | lua-load ${testdir}/httpclient_action.lua |
| 16 | defaults |
| 17 | mode tcp |
| 18 | timeout http-request 10s |
| 19 | timeout queue 1m |
| 20 | timeout connect 10s |
| 21 | timeout client 1m |
| 22 | timeout server 1m |
| 23 | timeout check 10s |
| 24 | |
| 25 | listen li1 |
| 26 | mode http |
| 27 | bind "fd@${fe1}" |
| 28 | tcp-request inspect-delay 10ms |
| 29 | tcp-request content lua.test |
| 30 | http-request return status 503 |
| 31 | |
| 32 | } -start |
| 33 | |
| 34 | client c0 -connect ${h1_fe1_sock} { |
| 35 | txreq |
| 36 | rxresp |
| 37 | expect resp.status == 503 |
| 38 | } -run |
| 39 | |