diff --git a/tests/testsuite/alt_registry.rs b/tests/testsuite/alt_registry.rs index 6f0d3f7119e1..d3f9b2e83192 100644 --- a/tests/testsuite/alt_registry.rs +++ b/tests/testsuite/alt_registry.rs @@ -416,7 +416,16 @@ or use environment variable CARGO_REGISTRIES_ALTERNATIVE_TOKEN", #[cargo_test] fn publish_to_alt_registry() { registry::alt_init(); - let p = project().file("src/main.rs", "fn main() {}").build(); + let p = project() + .file("src/main.rs", "fn main() {}") + .file( + ".cargo/config", + " + [publish] + timeout = 0 + ", + ) + .build(); // Setup the registry by publishing a package Package::new("bar", "0.0.1").alternative(true).publish(); @@ -425,7 +434,9 @@ fn publish_to_alt_registry() { p.cargo("login --registry alternative TOKEN").run(); // Now perform the actual publish - p.cargo("publish --registry alternative").run(); + p.cargo("publish --registry alternative -Zpublish-timeout") + .masquerade_as_nightly_cargo(&["publish-timeout"]) + .run(); validate_alt_upload( r#"{