From 0ed0a9a1418d426923273c4651c381e02ce05ba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Meadows-J=C3=B6nsson?= Date: Mon, 28 Sep 2026 14:19:19 +0200 Subject: [PATCH] Exclude 101 from random interim statuses in the HTTP/2 1xx test The "multiple before a single HEADERS" test picked each interim status from 100..199 and expected Mint to accept it. Mint rejects 101 in HTTP/2 since RFC 9113 section 8.6 doesn't support the Switching Protocols status, so the test failed for seeds that drew 101 (for example --seed 338383). The statuses are now drawn from 100..199 without 101. --- test/mint/http2/conn_test.exs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/mint/http2/conn_test.exs b/test/mint/http2/conn_test.exs index 2a80d667..66ba532e 100644 --- a/test/mint/http2/conn_test.exs +++ b/test/mint/http2/conn_test.exs @@ -1957,8 +1957,10 @@ defmodule Mint.HTTP2Test do describe "interim responses (1xx)" do test "multiple before a single HEADERS", %{conn: conn} do - info_status1 = Enum.random(100..199) - info_status2 = Enum.random(100..199) + # 101 is rejected in HTTP/2 (RFC 9113 ยง8.6). + info_statuses = Enum.to_list(100..199) -- [101] + info_status1 = Enum.random(info_statuses) + info_status2 = Enum.random(info_statuses) {conn, ref} = open_request(conn)