diff --git a/crates/integration_tests/src/lib.rs b/crates/integration_tests/src/lib.rs index 5777a4018..3f8f1fbe8 100644 --- a/crates/integration_tests/src/lib.rs +++ b/crates/integration_tests/src/lib.rs @@ -24,8 +24,6 @@ use iceberg_test_utils::{normalize_test_name, set_up}; use port_scanner::scan_port_addr; use tokio::time::sleep; -const REST_CATALOG_PORT: u16 = 8181; - pub struct TestFixture { pub _docker_compose: DockerCompose, pub rest_catalog: RestCatalog, @@ -41,25 +39,21 @@ pub async fn set_test_fixture(func: &str) -> TestFixture { // Start docker compose docker_compose.run(); - let rest_catalog_ip = docker_compose.get_container_ip("rest"); + let rest_catalog_addr = "localhost:8181".to_string(); - let read_port = format!("{}:{}", rest_catalog_ip, REST_CATALOG_PORT); loop { - if !scan_port_addr(&read_port) { + sleep(std::time::Duration::from_millis(1000)).await; + if !scan_port_addr(&rest_catalog_addr) { log::info!("Waiting for 1s rest catalog to ready..."); - sleep(std::time::Duration::from_millis(1000)).await; } else { break; } } - let container_ip = docker_compose.get_container_ip("minio"); - let read_port = format!("{}:{}", container_ip, 9000); - let config = RestCatalogConfig::builder() - .uri(format!("http://{}:{}", rest_catalog_ip, REST_CATALOG_PORT)) + .uri(format!("http://{}", rest_catalog_addr)) .props(HashMap::from([ - (S3_ENDPOINT.to_string(), format!("http://{}", read_port)), + (S3_ENDPOINT.to_string(), "http://localhost:9000".to_string()), (S3_ACCESS_KEY_ID.to_string(), "admin".to_string()), (S3_SECRET_ACCESS_KEY.to_string(), "password".to_string()), (S3_REGION.to_string(), "us-east-1".to_string()), diff --git a/crates/integration_tests/testdata/docker-compose.yaml b/crates/integration_tests/testdata/docker-compose.yaml index 490f4eb94..744a329b5 100644 --- a/crates/integration_tests/testdata/docker-compose.yaml +++ b/crates/integration_tests/testdata/docker-compose.yaml @@ -20,12 +20,12 @@ networks: services: rest: - image: tabulario/iceberg-rest:0.10.0 + image: tabulario/iceberg-rest:1.6.0 environment: - AWS_ACCESS_KEY_ID=admin - AWS_SECRET_ACCESS_KEY=password - AWS_REGION=us-east-1 - - CATALOG_CATOLOG__IMPL=org.apache.iceberg.jdbc.JdbcCatalog + - CATALOG_CATALOG__IMPL=org.apache.iceberg.jdbc.JdbcCatalog - CATALOG_URI=jdbc:sqlite:file:/tmp/iceberg_rest_mode=memory - CATALOG_WAREHOUSE=s3://icebergdata/demo - CATALOG_IO__IMPL=org.apache.iceberg.aws.s3.S3FileIO @@ -34,8 +34,6 @@ services: - minio networks: rest_bridge: - aliases: - - icebergdata.minio ports: - 8181:8181 expose: @@ -52,10 +50,11 @@ services: networks: rest_bridge: ports: + - 9000:9000 - 9001:9001 expose: - - 9001 - 9000 + - 9001 command: ["server", "/data", "--console-address", ":9001"] mc: