Skip to content

Commit

Permalink
Add a sleep to give the JVM some more time
Browse files Browse the repository at this point in the history
  • Loading branch information
Fokko committed Dec 2, 2024
1 parent 9825b07 commit 2dbb1cf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/integration_tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -41,7 +39,8 @@ pub async fn set_test_fixture(func: &str) -> TestFixture {
// Start docker compose
docker_compose.run();

let rest_catalog_addr = format!("127.0.0.1:{}", REST_CATALOG_PORT);
let rest_catalog_addr = "localhost:8181".to_string();
sleep(std::time::Duration::from_millis(10000)).await;

loop {
if !scan_port_addr(&rest_catalog_addr) {
Expand All @@ -55,7 +54,7 @@ pub async fn set_test_fixture(func: &str) -> TestFixture {
let config = RestCatalogConfig::builder()
.uri(format!("http://{}", rest_catalog_addr))
.props(HashMap::from([
(S3_ENDPOINT.to_string(), "http://127.0.0.1:9000".to_string()),
(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()),
Expand Down

0 comments on commit 2dbb1cf

Please sign in to comment.