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

Publish timeout issues with tests #11615

Closed
ehuss opened this issue Jan 22, 2023 · 2 comments · Fixed by #11650
Closed

Publish timeout issues with tests #11615

ehuss opened this issue Jan 22, 2023 · 2 comments · Fixed by #11650
Assignees
Labels
A-testing-cargo-itself Area: cargo's tests

Comments

@ehuss
Copy link
Contributor

ehuss commented Jan 22, 2023

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

  • alt_registry::publish_to_alt_registry
  • alt_registry::publish_with_crates_io_dep
  • alt_registry::publish_with_registry_dependency

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 Fix several tests that are waiting 60 seconds for publishing to time out #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

@ehuss ehuss added the A-testing-cargo-itself Area: cargo's tests label Jan 22, 2023
@epage
Copy link
Contributor

epage commented Jan 23, 2023

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
Copy link
Member

@rustbot claim
I am working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing-cargo-itself Area: cargo's tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants