File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
rust/cubestore/cubestore/src/config Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -1547,10 +1547,24 @@ impl Config {
15471547 }
15481548
15491549 pub fn test ( name : & str ) -> Config {
1550- let query_timeout = 15 ;
1550+ Self :: make_test_config ( Self :: test_config_obj ( name) )
1551+ }
1552+
1553+ /// Possibly there is nothing test-specific about this; its purpose is to be publicly used by Config::test.
1554+ pub fn make_test_config ( config_obj_impl : ConfigObjImpl ) -> Config {
15511555 Config {
15521556 injector : Injector :: new ( ) ,
1553- config_obj : Arc :: new ( ConfigObjImpl {
1557+ config_obj : Arc :: new ( config_obj_impl) ,
1558+ }
1559+ }
1560+
1561+ /// Constructs the underlying ConfigObjImpl used in `Config::test`, so that you can modify it
1562+ /// before passing it to Config::make_test_config.
1563+ pub fn test_config_obj ( name : & str ) -> ConfigObjImpl {
1564+ let query_timeout = 15 ;
1565+ // Git blame history preserving block
1566+ {
1567+ ConfigObjImpl {
15541568 data_dir : env:: current_dir ( )
15551569 . unwrap ( )
15561570 . join ( format ! ( "{}-local-store" , name) ) ,
@@ -1654,7 +1668,7 @@ impl Config {
16541668 remote_files_cleanup_delay_secs : 3600 ,
16551669 remote_files_cleanup_batch_size : 50000 ,
16561670 create_table_max_retries : 3 ,
1657- } ) ,
1671+ }
16581672 }
16591673 }
16601674
You can’t perform that action at this time.
0 commit comments