File tree
Expand file treeCollapse file tree1 file changed
+10
-0
lines changed google-cloud-spanner/src/main/java/com/google/cloud/spanner
Expand file treeCollapse file tree1 file changed
+10
-0
lines changed Original file line number | Diff line number | Diff line change |
---|
@@ -1164,6 +1164,16 @@ public static void useDefaultEnvironment() {
|
1164 | 1164 | SpannerOptions.environment = SpannerEnvironmentImpl.INSTANCE;
|
1165 | 1165 | }
|
1166 | 1166 |
|
| 1167 | +@Override |
| 1168 | +protected String getDefaultProject() { |
| 1169 | +String projectId = getDefaultProjectId(); |
| 1170 | +// The project id does not matter if we are using the emulator. |
| 1171 | +if (projectId == null && System.getenv("SPANNER_EMULATOR_HOST") != null) { |
| 1172 | +return "emulator-project"; |
| 1173 | +} |
| 1174 | +return projectId; |
| 1175 | +} |
| 1176 | + |
1167 | 1177 | public TransportChannelProvider getChannelProvider() {
|
1168 | 1178 | return channelProvider;
|
1169 | 1179 | }
|
|
You can’t perform that action at this time.
0 commit comments