Skip to content

Commit 15ea4c5

Browse files
committed
deps: remove duplicate dependencies
1 parent 1d89de5 commit 15ea4c5

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

pom.xml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -201,21 +201,6 @@
201201
</dependency>
202202

203203
<!-- Add OpenTelemetry implementation and exporters for use in integration tests -->
204-
<dependency>
205-
<groupId>io.opentelemetry</groupId>
206-
<artifactId>opentelemetry-sdk-common</artifactId>
207-
<scope>test</scope>
208-
</dependency>
209-
<dependency>
210-
<groupId>io.opentelemetry</groupId>
211-
<artifactId>opentelemetry-sdk</artifactId>
212-
<scope>test</scope>
213-
</dependency>
214-
<dependency>
215-
<groupId>io.opentelemetry</groupId>
216-
<artifactId>opentelemetry-sdk-trace</artifactId>
217-
<scope>test</scope>
218-
</dependency>
219204
<dependency>
220205
<groupId>com.google.cloud.opentelemetry</groupId>
221206
<artifactId>exporter-trace</artifactId>

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

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

6262
@Test
6363
public void testUseSingleJar() throws Exception {
64+
printDeps();
6465
buildSingleJar();
6566
buildMainClass();
6667
runTestApplication();
6768
}
6869

6970
@Test
7071
public void testUseShadedJar() throws Exception {
72+
printDeps();
7173
buildShadedJar();
7274
buildMainClass();
7375
runTestApplication();
@@ -91,6 +93,12 @@ private void runTestApplication() throws Exception {
9193
execute(builder);
9294
}
9395

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

118126
private void execute(ProcessBuilder builder) throws Exception {
127+
execute(builder, false);
128+
}
129+
130+
private void execute(ProcessBuilder builder, boolean showOutput) throws Exception {
119131
Process process = builder.start();
120-
String errors;
132+
String errors, output = "";
121133
try (InputStreamReader reader = new InputStreamReader(process.getErrorStream())) {
122134
errors = CharStreams.toString(reader);
123135
}
136+
if (showOutput) {
137+
try (InputStreamReader reader = new InputStreamReader(process.getInputStream())) {
138+
output = CharStreams.toString(reader);
139+
}
140+
}
124141
assertEquals(errors, 0, process.waitFor());
142+
if (showOutput) {
143+
System.out.print(output);
144+
}
125145
}
126146
}

0 commit comments

Comments
 (0)