mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-04-18 20:22:48 +02:00
REGTESTS: add QUIC test for max-total streams setting
Add a new QUIC regtest to test the new frontend stream.max-total setting. This test relies on two haproxy instances, as QUIC client and server. New setting stream.max-total is set to 3 on the server side. In total, 6 requests are performed, with a check to ensure that a new connection has been reopened for the last ones.
This commit is contained in:
parent
e2dbcd20f2
commit
15a19994df
69
reg-tests/quic/stream_max_total.vtc
Normal file
69
reg-tests/quic/stream_max_total.vtc
Normal file
@ -0,0 +1,69 @@
|
||||
varnishtest "Test tune.quic.fe.stream_max_total setting"
|
||||
feature ignore_unknown_macro
|
||||
|
||||
# QUIC backend are not supported with USE_QUIC_OPENSSL_COMPAT
|
||||
feature cmd "$HAPROXY_PROGRAM -cc 'feature(QUIC) && !feature(QUIC_OPENSSL_COMPAT) && !feature(OPENSSL_WOLFSSL)'"
|
||||
|
||||
haproxy ha_qsrv -conf {
|
||||
global
|
||||
tune.quic.fe.stream.max-total 3
|
||||
|
||||
defaults
|
||||
mode http
|
||||
timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
|
||||
timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
|
||||
timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
|
||||
|
||||
listen li
|
||||
bind "quic+fd@${fe_quic}" ssl crt ${testdir}/certs/common.pem
|
||||
http-request return status 200 hdr x-id %[fs.id]
|
||||
} -start
|
||||
|
||||
haproxy ha_qcli -conf {
|
||||
global
|
||||
expose-experimental-directives
|
||||
|
||||
defaults
|
||||
mode http
|
||||
timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
|
||||
timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
|
||||
timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
|
||||
|
||||
listen li
|
||||
bind "fd@${fe}"
|
||||
http-reuse always
|
||||
server quic quic4@${ha_qsrv_fe_quic_addr}:${ha_qsrv_fe_quic_port} ssl verify none
|
||||
} -start
|
||||
|
||||
client c1 -connect ${ha_qcli_fe_sock} {
|
||||
txreq
|
||||
rxresp
|
||||
expect resp.status == 200
|
||||
expect resp.http.x-id == 0
|
||||
|
||||
txreq
|
||||
rxresp
|
||||
expect resp.status == 200
|
||||
expect resp.http.x-id == 4
|
||||
|
||||
txreq
|
||||
rxresp
|
||||
expect resp.status == 200
|
||||
expect resp.http.x-id == 8
|
||||
|
||||
# max-stream reached, stream ID should be resetted
|
||||
txreq
|
||||
rxresp
|
||||
expect resp.status == 200
|
||||
expect resp.http.x-id == 0
|
||||
|
||||
txreq
|
||||
rxresp
|
||||
expect resp.status == 200
|
||||
expect resp.http.x-id == 4
|
||||
|
||||
txreq
|
||||
rxresp
|
||||
expect resp.status == 200
|
||||
expect resp.http.x-id == 8
|
||||
} -run
|
||||
Loading…
x
Reference in New Issue
Block a user