Skip to content

Commit ac4e4b0

Browse files
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.
1 parent 045c0b2 commit ac4e4b0

File tree

5 files changed

+11
-43
lines changed

5 files changed

+11
-43
lines changed

crates/integration_tests/tests/shared_tests/mod.rs renamed to crates/integration_tests/tests/common/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,10 @@ use std::collections::HashMap;
2020
use iceberg::spec::{NestedField, PrimitiveType, Schema, Type};
2121
use iceberg::{Catalog, CatalogBuilder, Namespace, NamespaceIdent};
2222
use iceberg_catalog_rest::RestCatalogBuilder;
23-
24-
use crate::get_shared_containers;
25-
26-
mod conflict_commit_test;
27-
mod read_evolved_schema;
28-
mod read_positional_deletes;
23+
use iceberg_integration_tests::get_test_fixture;
2924

3025
pub async fn random_ns() -> Namespace {
31-
let fixture = get_shared_containers();
26+
let fixture = get_test_fixture();
3227
let rest_catalog = RestCatalogBuilder::default()
3328
.load("rest", fixture.catalog_config.clone())
3429
.await

crates/integration_tests/tests/shared_tests/conflict_commit_test.rs renamed to crates/integration_tests/tests/conflict_commit_test.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@
1717

1818
//! Integration tests for rest catalog.
1919
20+
mod common;
21+
2022
use std::sync::Arc;
2123

2224
use arrow_array::{ArrayRef, BooleanArray, Int32Array, RecordBatch, StringArray};
25+
use common::{random_ns, test_schema};
2326
use futures::TryStreamExt;
2427
use iceberg::transaction::{ApplyTransactionAction, Transaction};
2528
use iceberg::writer::base_writer::data_file_writer::DataFileWriterBuilder;
@@ -31,14 +34,12 @@ use iceberg::writer::file_writer::rolling_writer::RollingFileWriterBuilder;
3134
use iceberg::writer::{IcebergWriter, IcebergWriterBuilder};
3235
use iceberg::{Catalog, CatalogBuilder, TableCreation};
3336
use iceberg_catalog_rest::RestCatalogBuilder;
37+
use iceberg_integration_tests::get_test_fixture;
3438
use parquet::file::properties::WriterProperties;
3539

36-
use crate::get_shared_containers;
37-
use crate::shared_tests::{random_ns, test_schema};
38-
3940
#[tokio::test]
4041
async fn test_append_data_file_conflict() {
41-
let fixture = get_shared_containers();
42+
let fixture = get_test_fixture();
4243
let rest_catalog = RestCatalogBuilder::default()
4344
.load("rest", fixture.catalog_config.clone())
4445
.await

crates/integration_tests/tests/shared_tests/read_evolved_schema.rs renamed to crates/integration_tests/tests/read_evolved_schema.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ use iceberg::expr::Reference;
2323
use iceberg::spec::Datum;
2424
use iceberg::{Catalog, CatalogBuilder, TableIdent};
2525
use iceberg_catalog_rest::RestCatalogBuilder;
26+
use iceberg_integration_tests::get_test_fixture;
2627
use ordered_float::OrderedFloat;
2728

28-
use crate::get_shared_containers;
29-
3029
#[tokio::test]
3130
async fn test_evolved_schema() {
32-
let fixture = get_shared_containers();
31+
let fixture = get_test_fixture();
3332
let rest_catalog = RestCatalogBuilder::default()
3433
.load("rest", fixture.catalog_config.clone())
3534
.await

crates/integration_tests/tests/shared_tests/read_positional_deletes.rs renamed to crates/integration_tests/tests/read_positional_deletes.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@
2020
use futures::TryStreamExt;
2121
use iceberg::{Catalog, CatalogBuilder, TableIdent};
2222
use iceberg_catalog_rest::RestCatalogBuilder;
23-
24-
use crate::get_shared_containers;
23+
use iceberg_integration_tests::get_test_fixture;
2524

2625
#[tokio::test]
2726
async fn test_read_table_with_positional_deletes() {
28-
let fixture = get_shared_containers();
27+
let fixture = get_test_fixture();
2928
let rest_catalog = RestCatalogBuilder::default()
3029
.load("rest", fixture.catalog_config.clone())
3130
.await

crates/integration_tests/tests/shared.rs

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)