File tree Expand file tree Collapse file tree 4 files changed +24
-2
lines changed
src/java/com/google/devtools/mobileharness Expand file tree Collapse file tree 4 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ package(
2020 default_applicable_licenses = ["//:license" ],
2121 default_visibility = [
2222 "//src/java/com/google/devtools/mobileharness/service/deviceconfig:__subpackages__" ,
23+ "//third_party/py/multitest_transport:__pkg__" ,
2324 ],
2425)
2526
Original file line number Diff line number Diff line change @@ -42,8 +42,9 @@ protected void configure() {
4242 @ Singleton
4343 DatabaseConnections provideDatabaseConnections () throws MobileHarnessException {
4444 Properties properties = new Properties ();
45- properties .put ("user" , "root" );
46- properties .put ("password" , "" );
45+ Flags .instance ().configServiceJdbcProperty .getNonNull ().forEach (properties ::setProperty );
46+ properties .putIfAbsent ("user" , "root" );
47+ properties .putIfAbsent ("password" , "" );
4748
4849 DatabaseConnections databaseConnections = new DatabaseConnections ();
4950 String jdbcUrl = Flags .instance ().configServiceJdbcUrl .getNonNull ();
Original file line number Diff line number Diff line change @@ -22,6 +22,17 @@ package(
2222 ],
2323)
2424
25+ filegroup (
26+ name = "device_config_sql" ,
27+ srcs = [
28+ "device_config_table.sdl" ,
29+ "lab_config_table.sdl" ,
30+ ],
31+ visibility = [
32+ "//third_party/py/multitest_transport:__pkg__" ,
33+ ],
34+ )
35+
2536java_library (
2637 name = "storage_client" ,
2738 srcs = ["StorageClient.java" ],
Original file line number Diff line number Diff line change @@ -709,6 +709,15 @@ public class Flags {
709709 converter = Flag .StringConverter .class )
710710 public Flag <String > configServiceGrpcTarget = configServiceGrpcTargetDefault ;
711711
712+ private static final Flag <Map <String , String >> configServiceJdbcPropertyDefault =
713+ Flag .value (Collections .emptyMap ());
714+
715+ @ com .beust .jcommander .Parameter (
716+ names = "--config_service_jdbc_property" ,
717+ description = "The JDBC property of the config service backend storage." ,
718+ converter = Flag .StringMapConverter .class )
719+ public Flag <Map <String , String >> configServiceJdbcProperty = configServiceJdbcPropertyDefault ;
720+
712721 private static final Flag <String > configServiceJdbcUrlDefault =
713722 Flag .value ("jdbc:mysql:///ats_db" );
714723
You can’t perform that action at this time.
0 commit comments