Skip to content

Commit c9af4b1

Browse files
authored
Merge branch 'main' into dp_check
2 parents e133464 + 971c34c commit c9af4b1

16 files changed

+1654
-99
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ If you are using Maven without the BOM, add this to your dependencies:
4949
If you are using Gradle 5.x or later, add this to your dependencies:
5050

5151
```Groovy
52-
implementation platform('com.google.cloud:libraries-bom:26.76.0')
52+
implementation platform('com.google.cloud:libraries-bom:26.77.0')
5353
5454
implementation 'com.google.cloud:google-cloud-bigtable'
5555
```

generation_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
gapic_generator_version: 2.67.0
2-
googleapis_commitish: d420134ab324c0cbe0f4ae06ad9697dac77f26ad
3-
libraries_bom_version: 26.76.0
2+
googleapis_commitish: 6df3ecf4fd43b64826de6a477d1a535ec18b0d7c
3+
libraries_bom_version: 26.77.0
44
template_excludes:
55
- .gitignore
66
- .kokoro/presubmit/integration.cfg

google-cloud-bigtable-emulator-core/src/main/java/com/google/cloud/bigtable/emulator/core/EmulatorController.java

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public class EmulatorController {
4444

4545
private final Path executable;
4646
private Process process;
47+
private Thread stdoutThread;
48+
private Thread stderrThread;
4749
private boolean isStopped = true;
4850
private Thread shutdownHook;
4951

@@ -127,8 +129,8 @@ public synchronized void start(int port)
127129
throw e;
128130
}
129131
}
130-
pipeStreamToLog(process.getInputStream(), Level.INFO);
131-
pipeStreamToLog(process.getErrorStream(), Level.WARNING);
132+
Thread stdoutThread = pipeStreamToLog(process.getInputStream(), Level.INFO);
133+
Thread stderrThread = pipeStreamToLog(process.getErrorStream(), Level.WARNING);
132134
isStopped = false;
133135

134136
shutdownHook =
@@ -164,6 +166,23 @@ public synchronized void stop() {
164166
} finally {
165167
isStopped = true;
166168
process.destroy();
169+
170+
try {
171+
process.waitFor();
172+
if (stdoutThread != null) {
173+
stdoutThread.join();
174+
}
175+
if (stderrThread != null) {
176+
stderrThread.join();
177+
}
178+
} catch (InterruptedException e) {
179+
Thread.currentThread().interrupt();
180+
LOGGER.log(Level.WARNING, "Interrupted while waiting for emulator to stop", e);
181+
} finally {
182+
stdoutThread = null;
183+
stderrThread = null;
184+
process = null;
185+
}
167186
}
168187
}
169188

@@ -239,7 +258,7 @@ private static void waitForPort(int port) throws InterruptedException, TimeoutEx
239258
}
240259

241260
/** Creates a thread that will pipe an {@link InputStream} to this class' Logger. */
242-
private static void pipeStreamToLog(final InputStream stream, final Level level) {
261+
private static Thread pipeStreamToLog(final InputStream stream, final Level level) {
243262
final BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
244263

245264
Thread thread =
@@ -258,6 +277,7 @@ private static void pipeStreamToLog(final InputStream stream, final Level level)
258277
});
259278
thread.setDaemon(true);
260279
thread.start();
280+
return thread;
261281
}
262282
// </editor-fold>
263283
}

google-cloud-bigtable/pom.xml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,6 @@
206206
<dependency>
207207
<groupId>io.grpc</groupId>
208208
<artifactId>grpc-opentelemetry</artifactId>
209-
<!-- TODO: remove this after next release (2.72.0). This is necessary to workaround a late downgrade of otel in cloud-shared-deps -->
210-
<exclusions>
211-
<exclusion>
212-
<groupId>io.opentelemetry</groupId>
213-
<artifactId>opentelemetry-api</artifactId>
214-
</exclusion>
215-
</exclusions>
216209
</dependency>
217210
<dependency>
218211
<groupId>org.threeten</groupId>
@@ -306,27 +299,11 @@
306299
<groupId>com.google.truth</groupId>
307300
<artifactId>truth</artifactId>
308301
<scope>test</scope>
309-
<exclusions>
310-
<!-- TODO: consider a different approach -->
311-
<!-- exclude to resolve conflict with guava -->
312-
<exclusion>
313-
<groupId>org.checkerframework</groupId>
314-
<artifactId>checker-qual</artifactId>
315-
</exclusion>
316-
</exclusions>
317302
</dependency>
318303
<dependency>
319304
<groupId>com.google.truth.extensions</groupId>
320305
<artifactId>truth-proto-extension</artifactId>
321306
<scope>test</scope>
322-
<exclusions>
323-
<!-- TODO: consider a different approach -->
324-
<!-- exclude to resolve conflict with guava -->
325-
<exclusion>
326-
<groupId>org.checkerframework</groupId>
327-
<artifactId>checker-qual</artifactId>
328-
</exclusion>
329-
</exclusions>
330307
</dependency>
331308
<dependency>
332309
<groupId>io.grpc</groupId>

0 commit comments

Comments
 (0)