@@ -1305,9 +1305,7 @@ fn build_request_client(
13051305
13061306// helper functions for testing proxy functionality
13071307mod proxy_helpers {
1308- use std:: time:: Duration ;
1309-
1310- use backon:: { ExponentialBuilder , Retryable } ;
1308+ use backon:: { ConstantBuilder , Retryable } ;
13111309 use testcontainers:: {
13121310 ContainerAsync , GenericImage ,
13131311 core:: { IntoContainerPort , WaitFor } ,
@@ -1329,7 +1327,7 @@ mod proxy_helpers {
13291327
13301328 /// Used to verify that traffic was (or was not) routed through the proxy.
13311329 /// Returns true if the proxy container's logs (stdout or stderr) contain `needle`.
1332- /// Retries with exponential backoff because tinyproxy may not flush its log immediately .
1330+ /// Retries with a constant backoff to give tinyproxy time to flush its log.
13331331 pub async fn proxy_log_contains (
13341332 container : & ContainerAsync < GenericImage > ,
13351333 needle : & str ,
@@ -1347,9 +1345,9 @@ mod proxy_helpers {
13471345 } ;
13481346 check
13491347 . retry (
1350- ExponentialBuilder :: default ( )
1351- . with_min_delay ( Duration :: from_millis ( 100 ) )
1352- . with_max_times ( 5 ) ,
1348+ ConstantBuilder :: default ( )
1349+ . with_delay ( std :: time :: Duration :: from_millis ( 500 ) )
1350+ . with_max_times ( 20 ) ,
13531351 )
13541352 . await
13551353 . is_ok ( )
@@ -1359,6 +1357,7 @@ mod proxy_helpers {
13591357#[ rstest]
13601358#[ case:: both_http_and_https_proxy( true ) ]
13611359#[ case:: https_proxy_only( false ) ]
1360+ #[ serial_test:: serial]
13621361#[ tokio:: test]
13631362async fn test_policy_server_with_https_proxy ( #[ case] set_http_proxy : bool ) {
13641363 use proxy_helpers:: * ;
@@ -1415,6 +1414,7 @@ async fn test_policy_server_with_https_proxy(#[case] set_http_proxy: bool) {
14151414/// source. The policy is first fetched from ghcr.io, pushed to the local registry, then the policy
14161415/// server is started with HTTP_PROXY pointing at tinyproxy. Both containers share the default
14171416/// docker bridge network so the proxy can forward requests to the registry by its bridge IP.
1417+ #[ serial_test:: serial]
14181418#[ tokio:: test]
14191419async fn test_policy_server_with_http_proxy ( ) {
14201420 use proxy_helpers:: * ;
@@ -1518,6 +1518,7 @@ async fn test_policy_server_with_http_proxy() {
15181518/// A real tinyproxy is started and set as HTTPS_PROXY. With NO_PROXY=ghcr.io the policy server
15191519/// must connect directly to ghcr.io, so startup and validation succeed and the proxy logs must not
15201520/// contain any reference to ghcr.io.
1521+ #[ serial_test:: serial]
15211522#[ tokio:: test]
15221523async fn test_policy_server_with_no_proxy ( ) {
15231524 use proxy_helpers:: * ;
0 commit comments