Skip to content

Commit b22fd87

Browse files
authored
chore: remove all-features test that should never actually pass (#863)
It turns out that the test run with `--all-features` should never be able to pass, due to the `static_max_level` features. Setting `--all-features` will enable `static_max_level_off`, which disables all tracing. Therefore, all the integration tests will fail. However, due to a bug in `tracing`'s `LevelFilter::OFF` implementation, `static_max_level_off` actually _enables_ everything. This makes the tests pass accidentally. If we fix this bug, though, everything will be disabled, as it should be, causing the tests to fail. Therefore, we can't merge a PR that fixes this, like #853, without first resolving the issues with the tests. Unfortunately, these are integration tests, so we cannot just put ```rust #[cfg(not(any(feature = "static_max_level_off", feature = ...))] ``` on the tests to skip them when the feature is set --- features set on the _crate_ being tested are not visible to integration tests. Similarly, we cannot use ```rust #[cfg(test)] ``` to not set the max level when running the tests, because the test cfg is not set for the crate when running integration tests, only unit tests. We could change all these tests to be integration tests, I suppose. However, we are already running a `cargo hack` job that tests every feature combination for `tracing` _except_ for the `static_max_level` ones, so I think it's fine to just remove this. Signed-off-by: Eliza Weisman <[email protected]>
1 parent 32cf418 commit b22fd87

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

.github/workflows/CI.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,6 @@ jobs:
191191
run: (cd tracing-core && cargo test --no-default-features)
192192
- name: "Test tracing no-std support"
193193
run: (cd tracing && cargo test --no-default-features)
194-
- name: "Test tracing all features"
195-
uses: actions-rs/cargo@v1
196-
with:
197-
command: test
198-
args: -p tracing --all-features
199-
200194
style:
201195
# Check style.
202196
needs: check

0 commit comments

Comments
 (0)