@@ -627,6 +627,7 @@ mod tests {
627627 use arrow_array:: { cast:: downcast_array, types:: * } ;
628628 use arrow_buffer:: Buffer ;
629629 use arrow_cast:: pretty:: pretty_format_batches;
630+ use arrow_ipc:: MetadataVersion ;
630631 use arrow_schema:: UnionMode ;
631632 use std:: collections:: HashMap ;
632633
@@ -638,7 +639,8 @@ mod tests {
638639 /// ensure only the batch's used data (not the allocated data) is sent
639640 /// <https://github.com/apache/arrow-rs/issues/208>
640641 fn test_encode_flight_data ( ) {
641- let options = IpcWriteOptions :: default ( ) ;
642+ // use 8-byte alignment - default alignment is 64 which produces bigger ipc data
643+ let options = IpcWriteOptions :: try_new ( 8 , false , MetadataVersion :: V5 ) . unwrap ( ) ;
642644 let c1 = UInt32Array :: from ( vec ! [ 1 , 2 , 3 , 4 , 5 , 6 ] ) ;
643645
644646 let batch = RecordBatch :: try_from_iter ( vec ! [ ( "a" , Arc :: new( c1) as ArrayRef ) ] )
@@ -1343,6 +1345,8 @@ mod tests {
13431345
13441346 let mut stream = FlightDataEncoderBuilder :: new ( )
13451347 . with_max_flight_data_size ( max_flight_data_size)
1348+ // use 8-byte alignment - default alignment is 64 which produces bigger ipc data
1349+ . with_options ( IpcWriteOptions :: try_new ( 8 , false , MetadataVersion :: V5 ) . unwrap ( ) )
13461350 . build ( futures:: stream:: iter ( [ Ok ( batch. clone ( ) ) ] ) ) ;
13471351
13481352 let mut i = 0 ;
0 commit comments