This is an automated email from the ASF dual-hosted git repository.
liurenjie1024 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git
The following commit(s) were added to refs/heads/main by this push:
new ac4e4b08c Let integration tests run in parallel (#2076)
ac4e4b08c is described below
commit ac4e4b08c73d3545a2b6ae8be67e10edd02a5f94
Author: Renjie Liu <[email protected]>
AuthorDate: Wed Jan 28 15:02:18 2026 +0800
Let integration tests run in parallel (#2076)
## Which issue does this PR close?
- Closes #2075 .
## What changes are included in this PR?
Refactor integrationt-tests module so that they can run in parallel.
## Are these changes tested?
Yes, ut.
---
.../tests/{shared_tests => common}/mod.rs | 9 ++------
.../{shared_tests => }/conflict_commit_test.rs | 9 ++++----
.../{shared_tests => }/read_evolved_schema.rs | 5 ++---
.../{shared_tests => }/read_positional_deletes.rs | 5 ++---
crates/integration_tests/tests/shared.rs | 26 ----------------------
5 files changed, 11 insertions(+), 43 deletions(-)
diff --git a/crates/integration_tests/tests/shared_tests/mod.rs
b/crates/integration_tests/tests/common/mod.rs
similarity index 92%
rename from crates/integration_tests/tests/shared_tests/mod.rs
rename to crates/integration_tests/tests/common/mod.rs
index 8fd56ab52..00039d889 100644
--- a/crates/integration_tests/tests/shared_tests/mod.rs
+++ b/crates/integration_tests/tests/common/mod.rs
@@ -20,15 +20,10 @@ use std::collections::HashMap;
use iceberg::spec::{NestedField, PrimitiveType, Schema, Type};
use iceberg::{Catalog, CatalogBuilder, Namespace, NamespaceIdent};
use iceberg_catalog_rest::RestCatalogBuilder;
-
-use crate::get_shared_containers;
-
-mod conflict_commit_test;
-mod read_evolved_schema;
-mod read_positional_deletes;
+use iceberg_integration_tests::get_test_fixture;
pub async fn random_ns() -> Namespace {
- let fixture = get_shared_containers();
+ let fixture = get_test_fixture();
let rest_catalog = RestCatalogBuilder::default()
.load("rest", fixture.catalog_config.clone())
.await
diff --git
a/crates/integration_tests/tests/shared_tests/conflict_commit_test.rs
b/crates/integration_tests/tests/conflict_commit_test.rs
similarity index 97%
rename from crates/integration_tests/tests/shared_tests/conflict_commit_test.rs
rename to crates/integration_tests/tests/conflict_commit_test.rs
index fc529cc3d..d171217b0 100644
--- a/crates/integration_tests/tests/shared_tests/conflict_commit_test.rs
+++ b/crates/integration_tests/tests/conflict_commit_test.rs
@@ -17,9 +17,12 @@
//! Integration tests for rest catalog.
+mod common;
+
use std::sync::Arc;
use arrow_array::{ArrayRef, BooleanArray, Int32Array, RecordBatch,
StringArray};
+use common::{random_ns, test_schema};
use futures::TryStreamExt;
use iceberg::transaction::{ApplyTransactionAction, Transaction};
use iceberg::writer::base_writer::data_file_writer::DataFileWriterBuilder;
@@ -31,14 +34,12 @@ use
iceberg::writer::file_writer::rolling_writer::RollingFileWriterBuilder;
use iceberg::writer::{IcebergWriter, IcebergWriterBuilder};
use iceberg::{Catalog, CatalogBuilder, TableCreation};
use iceberg_catalog_rest::RestCatalogBuilder;
+use iceberg_integration_tests::get_test_fixture;
use parquet::file::properties::WriterProperties;
-use crate::get_shared_containers;
-use crate::shared_tests::{random_ns, test_schema};
-
#[tokio::test]
async fn test_append_data_file_conflict() {
- let fixture = get_shared_containers();
+ let fixture = get_test_fixture();
let rest_catalog = RestCatalogBuilder::default()
.load("rest", fixture.catalog_config.clone())
.await
diff --git a/crates/integration_tests/tests/shared_tests/read_evolved_schema.rs
b/crates/integration_tests/tests/read_evolved_schema.rs
similarity index 98%
rename from crates/integration_tests/tests/shared_tests/read_evolved_schema.rs
rename to crates/integration_tests/tests/read_evolved_schema.rs
index fe8a488fa..62ec610a6 100644
--- a/crates/integration_tests/tests/shared_tests/read_evolved_schema.rs
+++ b/crates/integration_tests/tests/read_evolved_schema.rs
@@ -23,13 +23,12 @@ use iceberg::expr::Reference;
use iceberg::spec::Datum;
use iceberg::{Catalog, CatalogBuilder, TableIdent};
use iceberg_catalog_rest::RestCatalogBuilder;
+use iceberg_integration_tests::get_test_fixture;
use ordered_float::OrderedFloat;
-use crate::get_shared_containers;
-
#[tokio::test]
async fn test_evolved_schema() {
- let fixture = get_shared_containers();
+ let fixture = get_test_fixture();
let rest_catalog = RestCatalogBuilder::default()
.load("rest", fixture.catalog_config.clone())
.await
diff --git
a/crates/integration_tests/tests/shared_tests/read_positional_deletes.rs
b/crates/integration_tests/tests/read_positional_deletes.rs
similarity index 96%
rename from
crates/integration_tests/tests/shared_tests/read_positional_deletes.rs
rename to crates/integration_tests/tests/read_positional_deletes.rs
index 318b06bf0..96add4129 100644
--- a/crates/integration_tests/tests/shared_tests/read_positional_deletes.rs
+++ b/crates/integration_tests/tests/read_positional_deletes.rs
@@ -20,12 +20,11 @@
use futures::TryStreamExt;
use iceberg::{Catalog, CatalogBuilder, TableIdent};
use iceberg_catalog_rest::RestCatalogBuilder;
-
-use crate::get_shared_containers;
+use iceberg_integration_tests::get_test_fixture;
#[tokio::test]
async fn test_read_table_with_positional_deletes() {
- let fixture = get_shared_containers();
+ let fixture = get_test_fixture();
let rest_catalog = RestCatalogBuilder::default()
.load("rest", fixture.catalog_config.clone())
.await
diff --git a/crates/integration_tests/tests/shared.rs
b/crates/integration_tests/tests/shared.rs
deleted file mode 100644
index ab85e4d1a..000000000
--- a/crates/integration_tests/tests/shared.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-use iceberg_integration_tests::{GlobalTestFixture, get_test_fixture};
-
-pub mod shared_tests;
-
-/// Returns a reference to the shared test fixture.
-/// This assumes Docker containers are started externally via `make docker-up`.
-pub fn get_shared_containers() -> &'static GlobalTestFixture {
- get_test_fixture()
-}