@@ -8,21 +8,18 @@ use crate::server::SchedulerService;
88use datafusion:: arrow:: array:: RecordBatch ;
99use datafusion:: error:: DataFusionError ;
1010use datafusion:: logical_expr:: { col, Expr } ;
11- use datafusion:: prelude:: { concat, SessionContext } ;
12- use serde:: { Deserialize , Serialize } ;
11+ use datafusion:: prelude:: SessionContext ;
1312use std:: sync:: Arc ;
1413use tokio:: sync:: Mutex ;
1514use tonic:: transport:: Server ;
1615
1716pub struct IntegrationTest {
1817 catalog_path : String ,
19- config_path : String ,
2018 ctx : Arc < SessionContext > ,
2119 config : Config ,
2220 pub frontend : Arc < Mutex < MockFrontend > > ,
2321}
2422
25- const CONFIG_PATH : & str = concat ! ( env!( "CARGO_MANIFEST_DIR" ) , "/executors.toml" ) ;
2623pub const CATALOG_PATH : & str = concat ! ( env!( "CARGO_MANIFEST_DIR" ) , "/test_data" ) ;
2724const LOG_PATH : & str = concat ! ( env!( "CARGO_MANIFEST_DIR" ) , "/executor_logs" ) ;
2825
@@ -37,7 +34,6 @@ impl IntegrationTest {
3734 ctx,
3835 config,
3936 catalog_path,
40- config_path,
4137 frontend : Arc :: new ( Mutex :: new ( frontend) ) ,
4238 }
4339 }
@@ -195,20 +191,22 @@ impl IntegrationTest {
195191mod tests {
196192 use crate :: integration_test:: IntegrationTest ;
197193 use crate :: parser:: ExecutionPlanParser ;
198- // use crate::CATALOG_PATH;
199194 use super :: * ;
200195 use datafusion:: arrow:: array:: { Int32Array , RecordBatch } ;
201196 use datafusion:: arrow:: datatypes:: { DataType , Field , Schema } ;
202197 use std:: path:: PathBuf ;
203198 use std:: sync:: Arc ;
204199 use tokio:: fs;
205200
201+ const CONFIG_PATH : & str = concat ! ( env!( "CARGO_MANIFEST_DIR" ) , "/executors.toml" ) ;
202+
206203 async fn initialize_integration_test ( ) -> IntegrationTest {
207204 let catalog_path = concat ! ( env!( "CARGO_MANIFEST_DIR" ) , "/test_data" ) ;
208- let config_path = concat ! ( env! ( "CARGO_MANIFEST_DIR" ) , "/executors.toml" ) ;
205+ let config_path = CONFIG_PATH ;
209206 IntegrationTest :: new ( catalog_path. to_string ( ) , config_path. to_string ( ) ) . await
210207 }
211208
209+ #[ allow( dead_code) ]
212210 pub async fn get_all_tpch_queries_test ( ) -> Vec < String > {
213211 let parser = ExecutionPlanParser :: new ( CATALOG_PATH ) . await ;
214212 let mut res = Vec :: new ( ) ;
0 commit comments