@@ -31,13 +31,16 @@ use iceberg::writer::file_writer::location_generator::{
3131use iceberg:: writer:: file_writer:: ParquetWriterBuilder ;
3232use iceberg:: writer:: { IcebergWriter , IcebergWriterBuilder } ;
3333use iceberg:: { Catalog , Namespace , NamespaceIdent , TableCreation } ;
34- use iceberg_integration_tests :: set_test_fixture ;
34+ use iceberg_catalog_rest :: RestCatalog ;
3535use parquet:: arrow:: arrow_reader:: ArrowReaderOptions ;
3636use parquet:: file:: properties:: WriterProperties ;
3737
38+ use crate :: get_shared_containers;
39+
3840#[ tokio:: test]
3941async 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 ( ) ) ;
4144
4245 let ns = Namespace :: with_properties (
4346 NamespaceIdent :: from_strs ( [ "apple" , "ios" ] ) . unwrap ( ) ,
@@ -47,11 +50,9 @@ async fn test_append_data_file() {
4750 ] ) ,
4851 ) ;
4952
50- fixture
51- . rest_catalog
53+ let _ = rest_catalog
5254 . create_namespace ( ns. name ( ) , ns. properties ( ) . clone ( ) )
53- . await
54- . unwrap ( ) ;
55+ . await ;
5556
5657 let schema = Schema :: builder ( )
5758 . with_schema_id ( 1 )
@@ -69,8 +70,7 @@ async fn test_append_data_file() {
6970 . schema ( schema. clone ( ) )
7071 . build ( ) ;
7172
72- let table = fixture
73- . rest_catalog
73+ let table = rest_catalog
7474 . create_table ( ns. name ( ) , table_creation)
7575 . await
7676 . unwrap ( ) ;
@@ -137,7 +137,7 @@ async fn test_append_data_file() {
137137 let mut append_action = tx. fast_append ( None , vec ! [ ] ) . unwrap ( ) ;
138138 append_action. add_data_files ( data_file. clone ( ) ) . unwrap ( ) ;
139139 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 ( ) ;
141141
142142 // check result
143143 let batch_stream = table
@@ -157,7 +157,7 @@ async fn test_append_data_file() {
157157 let mut append_action = tx. fast_append ( None , vec ! [ ] ) . unwrap ( ) ;
158158 append_action. add_data_files ( data_file. clone ( ) ) . unwrap ( ) ;
159159 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 ( ) ;
161161
162162 // check result again
163163 let batch_stream = table
0 commit comments