@@ -31,13 +31,16 @@ use iceberg::writer::file_writer::location_generator::{
31
31
use iceberg:: writer:: file_writer:: ParquetWriterBuilder ;
32
32
use iceberg:: writer:: { IcebergWriter , IcebergWriterBuilder } ;
33
33
use iceberg:: { Catalog , Namespace , NamespaceIdent , TableCreation } ;
34
- use iceberg_integration_tests :: set_test_fixture ;
34
+ use iceberg_catalog_rest :: RestCatalog ;
35
35
use parquet:: arrow:: arrow_reader:: ArrowReaderOptions ;
36
36
use parquet:: file:: properties:: WriterProperties ;
37
37
38
+ use crate :: get_shared_containers;
39
+
38
40
#[ tokio:: test]
39
41
async fn test_append_data_file ( ) {
40
- let fixture = set_test_fixture ( "test_create_table" ) . await ;
42
+ let fixture = get_shared_containers ( ) ;
43
+ let rest_catalog = RestCatalog :: new ( fixture. catalog_config . clone ( ) ) ;
41
44
42
45
let ns = Namespace :: with_properties (
43
46
NamespaceIdent :: from_strs ( [ "apple" , "ios" ] ) . unwrap ( ) ,
@@ -47,11 +50,9 @@ async fn test_append_data_file() {
47
50
] ) ,
48
51
) ;
49
52
50
- fixture
51
- . rest_catalog
53
+ let _ = rest_catalog
52
54
. create_namespace ( ns. name ( ) , ns. properties ( ) . clone ( ) )
53
- . await
54
- . unwrap ( ) ;
55
+ . await ;
55
56
56
57
let schema = Schema :: builder ( )
57
58
. with_schema_id ( 1 )
@@ -69,8 +70,7 @@ async fn test_append_data_file() {
69
70
. schema ( schema. clone ( ) )
70
71
. build ( ) ;
71
72
72
- let table = fixture
73
- . rest_catalog
73
+ let table = rest_catalog
74
74
. create_table ( ns. name ( ) , table_creation)
75
75
. await
76
76
. unwrap ( ) ;
@@ -137,7 +137,7 @@ async fn test_append_data_file() {
137
137
let mut append_action = tx. fast_append ( None , vec ! [ ] ) . unwrap ( ) ;
138
138
append_action. add_data_files ( data_file. clone ( ) ) . unwrap ( ) ;
139
139
let tx = append_action. apply ( ) . await . unwrap ( ) ;
140
- let table = tx. commit ( & fixture . rest_catalog ) . await . unwrap ( ) ;
140
+ let table = tx. commit ( & rest_catalog) . await . unwrap ( ) ;
141
141
142
142
// check result
143
143
let batch_stream = table
@@ -157,7 +157,7 @@ async fn test_append_data_file() {
157
157
let mut append_action = tx. fast_append ( None , vec ! [ ] ) . unwrap ( ) ;
158
158
append_action. add_data_files ( data_file. clone ( ) ) . unwrap ( ) ;
159
159
let tx = append_action. apply ( ) . await . unwrap ( ) ;
160
- let table = tx. commit ( & fixture . rest_catalog ) . await . unwrap ( ) ;
160
+ let table = tx. commit ( & rest_catalog) . await . unwrap ( ) ;
161
161
162
162
// check result again
163
163
let batch_stream = table
0 commit comments