Skip to content

Commit c30d590

Browse files
committed
deps: remove deps that are already in java-spanner
1 parent e6df56a commit c30d590

File tree

2 files changed

+5
-42
lines changed

2 files changed

+5
-42
lines changed

pom.xml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -200,41 +200,24 @@
200200
<scope>test</scope>
201201
</dependency>
202202

203-
<!--
204-
Add OpenTelemetry implementation and exporters for use in integration tests.
205-
They are added with compile scope, as the Spanner client requires these, and we do not want to
206-
reduce the scope in the JDBC driver.
207-
-->
208-
<dependency>
209-
<groupId>io.opentelemetry</groupId>
210-
<artifactId>opentelemetry-context</artifactId>
211-
</dependency>
212-
<dependency>
213-
<groupId>io.opentelemetry</groupId>
214-
<artifactId>opentelemetry-sdk</artifactId>
215-
</dependency>
216-
<dependency>
217-
<groupId>io.opentelemetry</groupId>
218-
<artifactId>opentelemetry-sdk-common</artifactId>
219-
</dependency>
220-
<dependency>
221-
<groupId>io.opentelemetry</groupId>
222-
<artifactId>opentelemetry-sdk-trace</artifactId>
223-
</dependency>
203+
<!-- Add OpenTelemetry implementation and exporters for use in integration tests. -->
224204
<dependency>
225205
<groupId>com.google.cloud.opentelemetry</groupId>
226206
<artifactId>exporter-trace</artifactId>
227207
<version>0.32.0</version>
208+
<scope>test</scope>
228209
</dependency>
229210
<dependency>
230211
<groupId>com.google.cloud</groupId>
231212
<artifactId>google-cloud-trace</artifactId>
232213
<version>2.52.0</version>
214+
<scope>test</scope>
233215
</dependency>
234216
<dependency>
235217
<groupId>com.google.api.grpc</groupId>
236218
<artifactId>proto-google-cloud-trace-v1</artifactId>
237219
<version>2.52.0</version>
220+
<scope>test</scope>
238221
</dependency>
239222

240223
</dependencies>

src/test/java/com/google/cloud/spanner/jdbc/it/ITSingleJarTest.java

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,13 @@ public void setup() {
6161

6262
@Test
6363
public void testUseSingleJar() throws Exception {
64-
// printDeps();
6564
buildSingleJar();
6665
buildMainClass();
6766
runTestApplication();
6867
}
6968

7069
@Test
7170
public void testUseShadedJar() throws Exception {
72-
// printDeps();
7371
buildShadedJar();
7472
buildMainClass();
7573
runTestApplication();
@@ -93,12 +91,6 @@ private void runTestApplication() throws Exception {
9391
execute(builder);
9492
}
9593

96-
private void printDeps() throws Exception {
97-
ProcessBuilder builder = new ProcessBuilder();
98-
builder.command("mvn", "dependency:tree");
99-
execute(builder, true);
100-
}
101-
10294
private void buildSingleJar() throws Exception {
10395
ProcessBuilder builder = new ProcessBuilder();
10496
builder.command("mvn", "clean", "package", "-DskipTests", "-Dalt.build.dir=./target/single");
@@ -124,23 +116,11 @@ private void buildMainClass() throws Exception {
124116
}
125117

126118
private void execute(ProcessBuilder builder) throws Exception {
127-
execute(builder, false);
128-
}
129-
130-
private void execute(ProcessBuilder builder, boolean showOutput) throws Exception {
131119
Process process = builder.start();
132-
String errors, output = "";
120+
String errors;
133121
try (InputStreamReader reader = new InputStreamReader(process.getErrorStream())) {
134122
errors = CharStreams.toString(reader);
135123
}
136-
if (showOutput) {
137-
try (InputStreamReader reader = new InputStreamReader(process.getInputStream())) {
138-
output = CharStreams.toString(reader);
139-
}
140-
}
141124
assertEquals(errors, 0, process.waitFor());
142-
if (showOutput) {
143-
System.out.print(output);
144-
}
145125
}
146126
}

0 commit comments

Comments
 (0)