sync: move CancellationToken tests (#2477)

In preparation of work on `CancellationToken` internals, the tests are
moved into `tests/` and are updated to not depend on internals.
This commit is contained in:
Carl Lerche
2020-05-03 12:35:47 -07:00
committed by GitHub
parent 187af2e6a3
commit 264ae3bdb2
9 changed files with 294 additions and 363 deletions
+6
View File
@@ -30,3 +30,9 @@ jobs:
# tracking-issue: https://github.com/rust-lang/cargo/issues/5133
- script: cargo hack check --all --each-feature -Z avoid-dev-deps
displayName: cargo hack check --all --each-feature
# Try with unstable feature flags
- script: cargo hack check --all --each-feature -Z avoid-dev-deps
displayName: cargo hack check --all --each-feature
env:
RUSTFLAGS: '--cfg tokio_unstable'
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
parameters:
rust_version: ${{ parameters.rust }}
- script: RUSTFLAGS="--cfg loom" cargo test --lib --release --features "full" -- --nocapture $(scope)
- script: RUSTFLAGS="--cfg loom --cfg tokio_unstable" cargo test --lib --release --features "full" -- --nocapture $(scope)
env:
LOOM_MAX_PREEMPTIONS: 2
CI: 'True'
+17
View File
@@ -21,6 +21,23 @@ jobs:
- template: azure-is-release.yml
# Run `tokio` with only `full`
- script: cargo test --features full
env:
RUST_BACKTRACE: 1
CI: 'True'
displayName: tokio - cargo test --features full
workingDirectory: $(Build.SourcesDirectory)/tokio
# Run `tokio` with "unstable" cfg flag
- script: cargo test --all-features
env:
RUSTFLAGS: '--cfg tokio_unstable'
RUST_BACKTRACE: 1
CI: 'True'
displayName: tokio - cargo test --features full
workingDirectory: $(Build.SourcesDirectory)/tokio
- ${{ each crate in parameters.crates }}:
# Run with all crate features
- script: cargo test --all-features