@@ -36,6 +36,7 @@ use testcontainers::GenericImage;
3636use testcontainers:: Image ;
3737
3838use crate :: arg:: SqlLogicTestArgs ;
39+ use crate :: client:: BodyFormat ;
3940use crate :: client:: Client ;
4041use crate :: client:: ClientType ;
4142use crate :: client:: HttpClient ;
@@ -65,17 +66,27 @@ static HYBRID_CONFIGS: LazyLock<Vec<(Box<ClientType>, usize)>> = LazyLock::new(|
6566 vec ! [
6667 ( Box :: new( ClientType :: MySQL ) , 3 ) ,
6768 (
68- Box :: new( ClientType :: Ttc (
69- "ghcr.io/databendlabs/ttc-rust:latest" . to_string( ) ,
70- TTC_PORT_START ,
71- ) ) ,
69+ Box :: new( ClientType :: Ttc {
70+ image: "ghcr.io/databendlabs/ttc-rust:latest" . to_string( ) ,
71+ port: TTC_PORT_START ,
72+ body_format: BodyFormat :: Arrow ,
73+ } ) ,
7274 5 ,
7375 ) ,
7476 (
75- Box :: new( ClientType :: Ttc (
76- "ghcr.io/databendlabs/ttc-go:latest" . to_string( ) ,
77- TTC_PORT_START + 1 ,
78- ) ) ,
77+ Box :: new( ClientType :: Ttc {
78+ image: "ghcr.io/databendlabs/ttc-rust:latest" . to_string( ) ,
79+ port: TTC_PORT_START + 1 ,
80+ body_format: BodyFormat :: Json ,
81+ } ) ,
82+ 5 ,
83+ ) ,
84+ (
85+ Box :: new( ClientType :: Ttc {
86+ image: "ghcr.io/databendlabs/ttc-go:latest" . to_string( ) ,
87+ port: TTC_PORT_START + 2 ,
88+ body_format: BodyFormat :: Json ,
89+ } ) ,
7990 5 ,
8091 ) ,
8192 ]
@@ -138,12 +149,20 @@ pub async fn main() -> Result<()> {
138149 handler if handler. starts_with ( "ttc" ) => {
139150 if handler != "ttc_dev" {
140151 let image = format ! ( "ghcr.io/databendlabs/{handler}:latest" ) ;
141- run_ttc_container ( & image, TTC_PORT_START , args. port , & mut containers) . await ?;
152+ run_ttc_container (
153+ & image,
154+ TTC_PORT_START ,
155+ args. port ,
156+ & mut containers,
157+ BodyFormat :: Json ,
158+ )
159+ . await ?;
142160 }
143- run_ttc_client (
144- args. clone ( ) ,
145- ClientType :: Ttc ( handler. to_string ( ) , TTC_PORT_START ) ,
146- )
161+ run_ttc_client ( args. clone ( ) , ClientType :: Ttc {
162+ image : handler. to_string ( ) ,
163+ port : TTC_PORT_START ,
164+ body_format : BodyFormat :: Json ,
165+ } )
147166 . await ?;
148167 }
149168 _ => {
@@ -181,8 +200,12 @@ async fn run_hybrid_client(
181200 for ( c, _) in HYBRID_CONFIGS . iter ( ) {
182201 match c. as_ref ( ) {
183202 ClientType :: MySQL | ClientType :: Http => { }
184- ClientType :: Ttc ( image, port) => {
185- run_ttc_container ( image, * port, args. port , cs) . await ?;
203+ ClientType :: Ttc {
204+ image,
205+ port,
206+ body_format,
207+ } => {
208+ run_ttc_container ( image, * port, args. port , cs, * body_format) . await ?;
186209 }
187210 ClientType :: Hybird => panic ! ( "Can't run hybrid client in hybrid client" ) ,
188211 }
@@ -221,7 +244,11 @@ async fn create_databend(client_type: &ClientType, filename: &str) -> Result<Dat
221244 client = Client :: Http ( HttpClient :: create ( args. port ) . await ?) ;
222245 }
223246
224- ClientType :: Ttc ( image, port) => {
247+ ClientType :: Ttc {
248+ image,
249+ port,
250+ body_format : _,
251+ } => {
225252 let conn = format ! ( "127.0.0.1:{port}" ) ;
226253 client = Client :: Ttc ( TTCClient :: create ( image, & conn) . await ?) ;
227254 }
0 commit comments