Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix several tests that are waiting 60 seconds for publishing to time out #11388

Merged
merged 1 commit into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/testsuite/cargo_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,14 @@ fn publish_allowed() {
)
.file("src/lib.rs", "")
.build();

// HACK: Inject `a` directly into the index so `publish` won't block for it to be in
// the index.
//
// This is to ensure we can verify the Summary we post to the registry as doing so precludes
// the registry from processing the publish.
Package::new("a", "0.0.1").file("src/lib.rs", "").publish();

p.cargo("publish")
.replace_crates_io(registry.index_url())
.masquerade_as_nightly_cargo(&["test-dummy-unstable"])
Expand Down
48 changes: 48 additions & 0 deletions tests/testsuite/inheritable_workspace_fields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@ fn inherit_own_workspace_fields() {
.file("bar.txt", "") // should be included when packaging
.build();

// HACK: Inject `foo` directly into the index so `publish` won't block for it to be in
// the index.
//
// This is to ensure we can verify the Summary we post to the registry as doing so precludes
// the registry from processing the publish.
Package::new("foo", "1.2.3")
.file("src/lib.rs", "")
.publish();

p.cargo("publish")
.replace_crates_io(registry.index_url())
.run();
Expand Down Expand Up @@ -287,6 +296,16 @@ fn inherit_own_dependencies() {
assert!(lockfile.contains("dep"));
assert!(lockfile.contains("dep-dev"));
assert!(lockfile.contains("dep-build"));

// HACK: Inject `bar` directly into the index so `publish` won't block for it to be in
// the index.
//
// This is to ensure we can verify the Summary we post to the registry as doing so precludes
// the registry from processing the publish.
Package::new("bar", "0.2.0")
.file("src/lib.rs", "")
.publish();

p.cargo("publish")
.replace_crates_io(registry.index_url())
.run();
Expand Down Expand Up @@ -411,6 +430,16 @@ fn inherit_own_detailed_dependencies() {
p.cargo("check").run();
let lockfile = p.read_lockfile();
assert!(lockfile.contains("dep"));

// HACK: Inject `bar` directly into the index so `publish` won't block for it to be in
// the index.
//
// This is to ensure we can verify the Summary we post to the registry as doing so precludes
// the registry from processing the publish.
Package::new("bar", "0.2.0")
.file("src/lib.rs", "")
.publish();

p.cargo("publish")
.replace_crates_io(registry.index_url())
.run();
Expand Down Expand Up @@ -628,6 +657,15 @@ fn inherit_workspace_fields() {
.file("bar/bar.txt", "") // should be included when packaging
.build();

// HACK: Inject `bar` directly into the index so `publish` won't block for it to be in
// the index.
//
// This is to ensure we can verify the Summary we post to the registry as doing so precludes
// the registry from processing the publish.
Package::new("bar", "1.2.3")
.file("src/lib.rs", "")
.publish();

p.cargo("publish")
.replace_crates_io(registry.index_url())
.cwd("bar")
Expand Down Expand Up @@ -763,6 +801,16 @@ fn inherit_dependencies() {
assert!(lockfile.contains("dep"));
assert!(lockfile.contains("dep-dev"));
assert!(lockfile.contains("dep-build"));

// HACK: Inject `bar` directly into the index so `publish` won't block for it to be in
// the index.
//
// This is to ensure we can verify the Summary we post to the registry as doing so precludes
// the registry from processing the publish.
Package::new("bar", "0.2.0")
.file("src/lib.rs", "")
.publish();

p.cargo("publish")
.replace_crates_io(registry.index_url())
.cwd("bar")
Expand Down