Skip to content

Commit c92b45d

Browse files
DeviceInfracopybara-github
authored andcommitted
Internal change
PiperOrigin-RevId: 892299049
1 parent ff7b376 commit c92b45d

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

src/java/com/google/devtools/mobileharness/service/deviceconfig/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

src/java/com/google/devtools/mobileharness/service/deviceconfig/DeviceConfigModule.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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();

src/java/com/google/devtools/mobileharness/service/deviceconfig/storage/BUILD

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
2536
java_library(
2637
name = "storage_client",
2738
srcs = ["StorageClient.java"],

src/java/com/google/devtools/mobileharness/shared/util/flags/Flags.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)