aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/util/http
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-20 16:56:06 +0900
committernsfisis <nsfisis@gmail.com>2026-07-20 16:56:06 +0900
commitc175989cfa8b9558373edd1bd0696fd2a68431c2 (patch)
tree9d528e5e11203380dc1b3b7267e73ad04a0d4e13 /crates/shirabe/tests/util/http
parenta2110fa811c8f6c7d1c45a83c6fd1077eb6f3461 (diff)
downloadphp-shirabe-c175989cfa8b9558373edd1bd0696fd2a68431c2.tar.gz
php-shirabe-c175989cfa8b9558373edd1bd0696fd2a68431c2.tar.zst
php-shirabe-c175989cfa8b9558373edd1bd0696fd2a68431c2.zip
test(proxy-manager): un-ignore tests by serializing env-var access
The ignored tests raced on the process-wide HTTP_PROXY/etc env vars and the ProxyManager::INSTANCE mutex, causing spurious PoisonError panics when run in parallel. Adding #[serial_test::serial], the same annotation test_instantiation already used, fixes the race with no other changes needed.
Diffstat (limited to 'crates/shirabe/tests/util/http')
-rw-r--r--crates/shirabe/tests/util/http/proxy_manager_test.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/shirabe/tests/util/http/proxy_manager_test.rs b/crates/shirabe/tests/util/http/proxy_manager_test.rs
index 4383978d..5e928b1e 100644
--- a/crates/shirabe/tests/util/http/proxy_manager_test.rs
+++ b/crates/shirabe/tests/util/http/proxy_manager_test.rs
@@ -64,7 +64,7 @@ fn test_instantiation() {
}
#[test]
-#[ignore = "not #[serial_test::serial] like test_instantiation; races on the process-wide HTTP_PROXY/etc env vars and the ProxyManager::INSTANCE mutex when run in parallel with the other proxy_manager_test tests, causing spurious PoisonError panics"]
+#[serial_test::serial]
fn test_get_proxy_for_request_throws_on_bad_proxy_url() {
let _tear_down = TearDown;
set_up();
@@ -82,7 +82,7 @@ fn test_get_proxy_for_request_throws_on_bad_proxy_url() {
}
#[test]
-#[ignore = "not #[serial_test::serial] like test_instantiation; races on the process-wide HTTP_PROXY/etc env vars and the ProxyManager::INSTANCE mutex when run in parallel with the other proxy_manager_test tests, causing spurious PoisonError panics"]
+#[serial_test::serial]
fn test_lowercase_overrides_uppercase() {
let _tear_down = TearDown;
set_up();
@@ -129,7 +129,7 @@ fn test_lowercase_overrides_uppercase() {
}
#[test]
-#[ignore = "not #[serial_test::serial] like test_instantiation; races on the process-wide HTTP_PROXY/etc env vars and the ProxyManager::INSTANCE mutex when run in parallel with the other proxy_manager_test tests, causing spurious PoisonError panics"]
+#[serial_test::serial]
fn test_cgi_proxy_is_only_used_when_no_http_proxy() {
let _tear_down = TearDown;
set_up();
@@ -167,7 +167,7 @@ fn test_cgi_proxy_is_only_used_when_no_http_proxy() {
}
#[test]
-#[ignore = "not #[serial_test::serial] like test_instantiation; races on the process-wide HTTP_PROXY/etc env vars and the ProxyManager::INSTANCE mutex when run in parallel with the other proxy_manager_test tests, causing spurious PoisonError panics"]
+#[serial_test::serial]
fn test_no_http_proxy_does_not_use_https_proxy() {
let _tear_down = TearDown;
set_up();
@@ -184,7 +184,7 @@ fn test_no_http_proxy_does_not_use_https_proxy() {
}
#[test]
-#[ignore = "not #[serial_test::serial] like test_instantiation; races on the process-wide HTTP_PROXY/etc env vars and the ProxyManager::INSTANCE mutex when run in parallel with the other proxy_manager_test tests, causing spurious PoisonError panics"]
+#[serial_test::serial]
fn test_no_https_proxy_does_not_use_http_proxy() {
let _tear_down = TearDown;
set_up();
@@ -201,7 +201,7 @@ fn test_no_https_proxy_does_not_use_http_proxy() {
}
#[test]
-#[ignore = "not #[serial_test::serial] like test_instantiation; races on the process-wide HTTP_PROXY/etc env vars and the ProxyManager::INSTANCE mutex when run in parallel with the other proxy_manager_test tests, causing spurious PoisonError panics"]
+#[serial_test::serial]
fn test_get_proxy_for_request() {
use indexmap::IndexMap;
use shirabe_php_shim::PhpMixed;