Skip to content

Commit

Permalink
Fixes and updated dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Omega359 committed Dec 21, 2024
1 parent 674df06 commit e9323f6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
3 changes: 1 addition & 2 deletions datafusion/sqllogictest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ once_cell = { version = "1.20", optional = true }
postgres-protocol = { version = "0.6.7", optional = true }
postgres-types = { version = "0.2.8", features = ["derive", "with-chrono-0_4"], optional = true }
rust_decimal = { version = "1.36.0", features = ["tokio-pg"] }
sqllogictest = { git = "https://github.com/Omega359/sqllogictest-rs.git", branch = "main" }
sqllogictest = "0.24.0"
sqlparser = { workspace = true }
tempfile = { workspace = true }
testcontainers = { version = "0.23", features = ["default"], optional = true }
Expand All @@ -77,7 +77,6 @@ postgres = [

[dev-dependencies]
env_logger = { workspace = true }
in-container = "^1"
tokio = { workspace = true, features = ["rt-multi-thread"] }

[[test]]
Expand Down
4 changes: 2 additions & 2 deletions datafusion/sqllogictest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ INCLUDE_SQLITE=true cargo test --test sqllogictests
```

Note that there are well over 5 million queries in these tests and running the
sqlite tests will take a long time. You may wish to run them in release mode:
sqlite tests will take a long time. You may wish to run them in release-nonlto mode:

```shell
INCLUDE_SQLITE=true cargo test --release --test sqllogictests
INCLUDE_SQLITE=true cargo test --profile release-nonlto --test sqllogictests
```

The sqlite tests can also be run with the postgres runner to verify compatibility:
Expand Down
10 changes: 4 additions & 6 deletions datafusion/sqllogictest/bin/sqllogictests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ async fn run_tests() -> Result<()> {
m.println(format!("Completed in {}", HumanDuration(start.elapsed())))?;

#[cfg(feature = "postgres")]
if options.postgres_runner {
if options.postgres_runner && !is_pg_uri_set() {
POSTGRES_IN.tx.send(ContainerCommands::Stop).unwrap_or(());
POSTGRES_STOPPED.rx.lock().await.recv().await;
}
Expand Down Expand Up @@ -755,11 +755,9 @@ pub async fn start_postgres(
.start()
.await
.unwrap();
let host = if in_container::in_container() {
"host.docker.internal".to_string()
} else {
container.get_host().await.unwrap().to_string()
};
// uncomment this if you are running docker in docker
// let host = "host.docker.internal".to_string();
let host = container.get_host().await.unwrap().to_string();
let port = container.get_host_port_ipv4(5432).await.unwrap();

let mut rx = in_channel.rx.lock().await;
Expand Down

0 comments on commit e9323f6

Please sign in to comment.