Skip to content

Commit 8a650f5

Browse files
authored
Make test_display_pg_json pass regardless of build setup and dependencies (#21502)
## Which issue does this PR close? - Closes ##21501. ## Rationale for this change Running tests for `datafusion-expr` currently fails locally, but due to feature unification with the `subtrait` dependency it does pass in CI. ## What changes are included in this PR? Enables a feature for a dependency during tests. ## Are these changes tested? Ran tests for the crate directly. ## Are there any user-facing changes? None. --------- Signed-off-by: Adam Gutglick <adamgsal@gmail.com>
1 parent 29f1acd commit 8a650f5

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion/expr/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,6 @@ sqlparser = { workspace = true, optional = true }
6666
ctor = { workspace = true }
6767
env_logger = { workspace = true }
6868
insta = { workspace = true }
69+
# Makes sure `test_display_pg_json` behaves in a consistent way regardless of
70+
# feature unification with dependencies
71+
serde_json = { workspace = true, features = ["preserve_order"] }

datafusion/sqllogictest/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,17 @@ substrait = ["datafusion-substrait"]
8484
[dev-dependencies]
8585
env_logger = { workspace = true }
8686
regex = { workspace = true }
87+
# Required to make sure tests for pg display behaves consistently
88+
# regardless of feature unification with dependencies
89+
serde_json = { workspace = true, features = ["preserve_order"] }
8790
tokio = { workspace = true, features = ["rt-multi-thread"] }
8891

8992
[[test]]
9093
harness = false
9194
name = "sqllogictests"
9295
path = "bin/sqllogictests.rs"
96+
97+
# Required because we pull serde_json with a feature to get consistent pg display,
98+
# but its not directly used.
99+
[package.metadata.cargo-machete]
100+
ignored = "serde_json"

0 commit comments

Comments
 (0)