Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 5 additions & 96 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ chrono = "0.4.38"
ctor = "0.2.8"
datafusion = "45"
derive_builder = "0.20"
env_logger = "0.11.0"
expect-test = "1"
fnv = "1.0.7"
futures = "0.3"
Expand All @@ -72,7 +71,6 @@ iceberg-catalog-memory = { version = "0.4.0", path = "./crates/catalog/memory" }
iceberg-catalog-rest = { version = "0.4.0", path = "./crates/catalog/rest" }
iceberg-datafusion = { version = "0.4.0", path = "./crates/integrations/datafusion" }
itertools = "0.13"
log = "0.4.22"
mockito = "1"
murmur3 = "0.5.2"
num-bigint = "0.4.6"
Expand All @@ -98,6 +96,8 @@ tempfile = "3.18"
tera = "1"
thrift = "0.17.0"
tokio = { version = "1.44", default-features = false }
tracing = "0.1.37"
tracing-subscriber = "0.3.8"
typed-builder = "0.20"
url = "2.5.4"
uuid = { version = "1.14", features = ["v7"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/catalog/glue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ async-trait = { workspace = true }
aws-config = { workspace = true }
aws-sdk-glue = { workspace = true }
iceberg = { workspace = true }
log = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
typed-builder = { workspace = true }
uuid = { workspace = true }

Expand Down
3 changes: 2 additions & 1 deletion crates/catalog/glue/tests/glue_catalog_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ use iceberg_test_utils::docker::DockerCompose;
use iceberg_test_utils::{normalize_test_name, set_up};
use port_scanner::scan_port_addr;
use tokio::time::sleep;
use tracing::info;

const GLUE_CATALOG_PORT: u16 = 5000;
const MINIO_PORT: u16 = 9000;
Expand Down Expand Up @@ -68,7 +69,7 @@ async fn get_catalog() -> GlueCatalog {
let glue_socket_addr = SocketAddr::new(glue_catalog_ip, GLUE_CATALOG_PORT);
let minio_socket_addr = SocketAddr::new(minio_ip, MINIO_PORT);
while !scan_port_addr(glue_socket_addr) {
log::info!("Waiting for 1s glue catalog to ready...");
info!("Waiting for 1s glue catalog to ready...");
sleep(std::time::Duration::from_millis(1000)).await;
}

Expand Down
2 changes: 1 addition & 1 deletion crates/catalog/hms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ async-trait = { workspace = true }
chrono = { workspace = true }
hive_metastore = { workspace = true }
iceberg = { workspace = true }
log = { workspace = true }
pilota = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
typed-builder = { workspace = true }
uuid = { workspace = true }
volo-thrift = { workspace = true }
Expand Down
5 changes: 3 additions & 2 deletions crates/catalog/hms/tests/hms_catalog_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use iceberg_test_utils::docker::DockerCompose;
use iceberg_test_utils::{normalize_test_name, set_up};
use port_scanner::scan_port_addr;
use tokio::time::sleep;
use tracing::info;

const HMS_CATALOG_PORT: u16 = 9083;
const MINIO_PORT: u16 = 9000;
Expand Down Expand Up @@ -67,8 +68,8 @@ async fn get_catalog() -> HmsCatalog {
let hms_socket_addr = SocketAddr::new(hms_catalog_ip, HMS_CATALOG_PORT);
let minio_socket_addr = SocketAddr::new(minio_ip, MINIO_PORT);
while !scan_port_addr(hms_socket_addr) {
log::info!("scan hms_socket_addr {} check", hms_socket_addr);
log::info!("Waiting for 1s hms catalog to ready...");
info!("scan hms_socket_addr {} check", hms_socket_addr);
info!("Waiting for 1s hms catalog to ready...");
sleep(std::time::Duration::from_millis(1000)).await;
}

Expand Down
2 changes: 1 addition & 1 deletion crates/catalog/rest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ chrono = { workspace = true }
http = { workspace = true }
iceberg = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
reqwest = { workspace = true }
serde = { workspace = true }
serde_derive = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["sync"] }
tracing = { workspace = true }
typed-builder = { workspace = true }
uuid = { workspace = true, features = ["v4"] }

Expand Down
3 changes: 2 additions & 1 deletion crates/catalog/rest/tests/rest_catalog_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use iceberg_test_utils::docker::DockerCompose;
use iceberg_test_utils::{normalize_test_name, set_up};
use port_scanner::scan_port_addr;
use tokio::time::sleep;
use tracing::info;

const REST_CATALOG_PORT: u16 = 8181;
static DOCKER_COMPOSE_ENV: RwLock<Option<DockerCompose>> = RwLock::new(None);
Expand Down Expand Up @@ -62,7 +63,7 @@ async fn get_catalog() -> RestCatalog {

let rest_socket_addr = SocketAddr::new(rest_catalog_ip, REST_CATALOG_PORT);
while !scan_port_addr(rest_socket_addr) {
log::info!("Waiting for 1s rest catalog to ready...");
info!("Waiting for 1s rest catalog to ready...");
sleep(std::time::Duration::from_millis(1000)).await;
}

Expand Down
4 changes: 2 additions & 2 deletions crates/test_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ license = { workspace = true }
repository = { workspace = true }

[dependencies]
env_logger = { workspace = true }
log = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }

[features]
tests = []
10 changes: 6 additions & 4 deletions crates/test_utils/src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,27 @@

use std::process::Command;

use tracing::info;

pub fn run_command(mut cmd: Command, desc: impl ToString) {
let desc = desc.to_string();
log::info!("Starting to {}, command: {:?}", &desc, cmd);
info!("Starting to {}, command: {:?}", &desc, cmd);
let exit = cmd.status().unwrap();
if exit.success() {
log::info!("{} succeed!", desc)
info!("{} succeed!", desc)
} else {
panic!("{} failed: {:?}", desc, exit);
}
}

pub fn get_cmd_output_result(mut cmd: Command, desc: impl ToString) -> Result<String, String> {
let desc = desc.to_string();
log::info!("Starting to {}, command: {:?}", &desc, cmd);
info!("Starting to {}, command: {:?}", &desc, cmd);
let result = cmd.output();
match result {
Ok(output) => {
if output.status.success() {
log::info!("{} succeed!", desc);
info!("{} succeed!", desc);
Ok(String::from_utf8(output.stdout).unwrap())
} else {
Err(format!("{} failed with rc: {:?}", desc, output.status))
Expand Down
4 changes: 3 additions & 1 deletion crates/test_utils/src/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
use std::net::IpAddr;
use std::process::Command;

use tracing::error;

use crate::cmd::{get_cmd_output, get_cmd_output_result, run_command};

/// A utility to manage the lifecycle of `docker compose`.
Expand Down Expand Up @@ -127,7 +129,7 @@ impl DockerCompose {
match ip_result {
Ok(ip) => ip,
Err(e) => {
log::error!("Invalid IP, {e}");
error!("Invalid IP, {e}");
panic!("Failed to parse IP for {container_name}")
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/test_utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ mod common {

static INIT: Once = Once::new();
pub fn set_up() {
INIT.call_once(env_logger::init);
INIT.call_once(tracing_subscriber::fmt::init);
}
pub fn normalize_test_name(s: impl ToString) -> String {
s.to_string().replace("::", "__").replace('.', "_")
Expand Down
Loading