rust-lang / cargo

The Rust package manager
https://doc.rust-lang.org/cargo
Apache License 2.0
12.76k stars 2.42k forks source link

Publish timeout issues with tests #11615

Closed ehuss closed 1 year ago

ehuss commented 1 year ago

The following tests are blocking for a minute waiting for a publish that never finishes:

This is a multi-part issue:

  1. Fix these tests so they don't block.
  2. Change these tests so that they use with_stderr to validate their output (which would have caught this regression).
  3. Avoid the "hack" added in #11388. I'm not sure what the best approach would be here. One would be to spin up the publish server so that instead of cargo just writing the new file, it would actually speak HTTP. Another is to disable the delay. Probably some other options are viable as well. (And similarly update those tests to validate their output.)
  4. Implement something to prevent this from happening in the future. I'm not sure about the best approach here, but perhaps something like if cargo publish fails to wait for the propagation, to fail the test.

cc @arlosi

epage commented 1 year ago

sigh when originally implementing this, the timeouts were hard to find and deal with in tests. I appreciate cargo nextest highlights overly long test cases and wish that was more generally available.

Rustin170506 commented 1 year ago

@rustbot claim I am working on this.