Skip to content
This repository was archived by the owner on Dec 23, 2023. It is now read-only.

Commit bb3770a

Browse files
authored
Build: Upgrade gRPC and Google dependency versions. (#1951)
* Build: Upgrade gRPC and Google dependency versions. * Replace isSameAs with isSameInstanceAs. * Update contains* methods.
1 parent 281e94d commit bb3770a

File tree

11 files changed

+34
-33
lines changed

11 files changed

+34
-33
lines changed

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ subprojects {
161161
findBugsAnnotationsVersion = '3.0.1'
162162
findBugsJsr305Version = '3.0.2'
163163
errorProneVersion = '2.3.2'
164-
grpcVersion = '1.21.0'
164+
grpcVersion = '1.22.1'
165165
guavaVersion = '26.0-android'
166-
googleAuthVersion = '0.13.0'
167-
googleCloudBetaVersion = '0.83.0-beta'
168-
googleCloudGaVersion = '1.65.0'
166+
googleAuthVersion = '0.16.2'
167+
googleCloudBetaVersion = '0.100.0-beta'
168+
googleCloudGaVersion = '1.82.0'
169169
log4j2Version = '2.11.1'
170170
signalfxVersion = '0.0.48'
171171
springBoot2Version = '2.1.5.RELEASE'
@@ -229,7 +229,7 @@ subprojects {
229229
junit: 'junit:junit:4.12',
230230
mockito: 'org.mockito:mockito-core:2.28.1',
231231
spring_test: "org.springframework:spring-test:${springVersion}",
232-
truth: 'com.google.truth:truth:0.44',
232+
truth: 'com.google.truth:truth:1.0',
233233
spring_boot_test: "org.springframework.boot:spring-boot-starter-test:${springBootTestVersion}",
234234
spring_boot_test2: "org.springframework.boot:spring-boot-starter-test:${springBoot2Version}",
235235
dropwizard: "io.dropwizard.metrics:metrics-core:${dropwizardVersion}",

contrib/agent/src/integration-test/java/io/opencensus/contrib/agent/instrumentation/ExecutorInstrumentationIT.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ public void execute() throws Exception {
6969
new Runnable() {
7070
@Override
7171
public void run() {
72-
assertThat(Thread.currentThread()).isNotSameAs(callerThread);
73-
assertThat(Context.current()).isSameAs(context);
72+
assertThat(Thread.currentThread()).isNotSameInstanceAs(callerThread);
73+
assertThat(Context.current()).isSameInstanceAs(context);
7474
assertThat(KEY.get()).isEqualTo("myvalue");
7575
tested.release();
7676
}
@@ -92,8 +92,8 @@ public void submit_Callable() throws Exception {
9292
new Callable<Void>() {
9393
@Override
9494
public Void call() throws Exception {
95-
assertThat(Thread.currentThread()).isNotSameAs(callerThread);
96-
assertThat(Context.current()).isSameAs(context);
95+
assertThat(Thread.currentThread()).isNotSameInstanceAs(callerThread);
96+
assertThat(Context.current()).isSameInstanceAs(context);
9797
assertThat(KEY.get()).isEqualTo("myvalue");
9898
tested.set(true);
9999

@@ -118,8 +118,8 @@ public void submit_Runnable() throws Exception {
118118
new Runnable() {
119119
@Override
120120
public void run() {
121-
assertThat(Thread.currentThread()).isNotSameAs(callerThread);
122-
assertThat(Context.current()).isSameAs(context);
121+
assertThat(Thread.currentThread()).isNotSameInstanceAs(callerThread);
122+
assertThat(Context.current()).isSameInstanceAs(context);
123123
assertThat(KEY.get()).isEqualTo("myvalue");
124124
tested.set(true);
125125
}
@@ -143,16 +143,16 @@ public void submit_RunnableWithResult() throws Exception {
143143
new Runnable() {
144144
@Override
145145
public void run() {
146-
assertThat(Thread.currentThread()).isNotSameAs(callerThread);
147-
assertThat(Context.current()).isNotSameAs(Context.ROOT);
148-
assertThat(Context.current()).isSameAs(context);
146+
assertThat(Thread.currentThread()).isNotSameInstanceAs(callerThread);
147+
assertThat(Context.current()).isNotSameInstanceAs(Context.ROOT);
148+
assertThat(Context.current()).isSameInstanceAs(context);
149149
assertThat(KEY.get()).isEqualTo("myvalue");
150150
tested.set(true);
151151
}
152152
},
153153
result);
154154

155-
assertThat(future.get()).isSameAs(result);
155+
assertThat(future.get()).isSameInstanceAs(result);
156156
assertThat(tested.get()).isTrue();
157157
}
158158

@@ -182,8 +182,8 @@ public void run() {
182182
assertThat(ste[2].getClassName()).startsWith("io.grpc.Context$");
183183
assertThat(ste[3].getClassName()).doesNotContain("Context");
184184

185-
assertThat(Thread.currentThread()).isNotSameAs(callerThread);
186-
assertThat(Context.current()).isSameAs(context);
185+
assertThat(Thread.currentThread()).isNotSameInstanceAs(callerThread);
186+
assertThat(Context.current()).isSameInstanceAs(context);
187187
assertThat(KEY.get()).isEqualTo("myvalue");
188188

189189
tested.release();

contrib/agent/src/integration-test/java/io/opencensus/contrib/agent/instrumentation/ThreadInstrumentationIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public void start_Runnable() throws Exception {
5757
new Runnable() {
5858
@Override
5959
public void run() {
60-
assertThat(Context.current()).isSameAs(context);
60+
assertThat(Context.current()).isSameInstanceAs(context);
6161
assertThat(KEY.get()).isEqualTo("myvalue");
6262
tested.set(true);
6363
}
@@ -81,7 +81,7 @@ class MyThread extends Thread {
8181

8282
@Override
8383
public void run() {
84-
assertThat(Context.current()).isSameAs(context);
84+
assertThat(Context.current()).isSameInstanceAs(context);
8585
assertThat(KEY.get()).isEqualTo("myvalue");
8686
tested.set(true);
8787
}
@@ -139,6 +139,6 @@ public void run() {
139139

140140
// Assert that the automatic context propagation added by ThreadInstrumentation did not
141141
// interfere with the automatically propagated context from Executor#execute.
142-
assertThat(newThreadCtx.get()).isSameAs(context);
142+
assertThat(newThreadCtx.get()).isSameInstanceAs(context);
143143
}
144144
}

contrib/agent/src/test/java/io/opencensus/contrib/agent/bootstrap/TraceTrampolineTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ public void startScopedSpan() {
5555
Closeable closeable = TraceTrampoline.startScopedSpan("test");
5656

5757
Mockito.verify(mockTraceStrategy).startScopedSpan("test");
58-
assertThat(closeable).isSameAs(mockCloseable);
58+
assertThat(closeable).isSameInstanceAs(mockCloseable);
5959
}
6060
}

contrib/agent/src/test/java/io/opencensus/contrib/agent/instrumentation/ExecutorInstrumentationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void instrument_disabled() {
4141

4242
AgentBuilder agentBuilder2 = instrumentation.instrument(agentBuilder, settings);
4343

44-
assertThat(agentBuilder2).isSameAs(agentBuilder);
44+
assertThat(agentBuilder2).isSameInstanceAs(agentBuilder);
4545
}
4646

4747
@Test
@@ -50,6 +50,6 @@ public void instrument_enabled() {
5050

5151
AgentBuilder agentBuilder2 = instrumentation.instrument(agentBuilder, settings);
5252

53-
assertThat(agentBuilder2).isNotSameAs(agentBuilder);
53+
assertThat(agentBuilder2).isNotSameInstanceAs(agentBuilder);
5454
}
5555
}

contrib/agent/src/test/java/io/opencensus/contrib/agent/instrumentation/ThreadInstrumentationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void instrument_disabled() {
4141

4242
AgentBuilder agentBuilder2 = instrumentation.instrument(agentBuilder, settings);
4343

44-
assertThat(agentBuilder2).isSameAs(agentBuilder);
44+
assertThat(agentBuilder2).isSameInstanceAs(agentBuilder);
4545
}
4646

4747
@Test
@@ -50,6 +50,6 @@ public void instrument_enabled() {
5050

5151
AgentBuilder agentBuilder2 = instrumentation.instrument(agentBuilder, settings);
5252

53-
assertThat(agentBuilder2).isNotSameAs(agentBuilder);
53+
assertThat(agentBuilder2).isNotSameInstanceAs(agentBuilder);
5454
}
5555
}

contrib/agent/src/test/java/io/opencensus/contrib/agent/instrumentation/UrlInstrumentationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void instrument_disabled() {
4141

4242
AgentBuilder agentBuilder2 = instrumentation.instrument(agentBuilder, settings);
4343

44-
assertThat(agentBuilder2).isSameAs(agentBuilder);
44+
assertThat(agentBuilder2).isSameInstanceAs(agentBuilder);
4545
}
4646

4747
@Test
@@ -50,6 +50,6 @@ public void instrument_enabled() {
5050

5151
AgentBuilder agentBuilder2 = instrumentation.instrument(agentBuilder, settings);
5252

53-
assertThat(agentBuilder2).isNotSameAs(agentBuilder);
53+
assertThat(agentBuilder2).isNotSameInstanceAs(agentBuilder);
5454
}
5555
}

examples/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ group = "io.opencensus"
3434
version = "0.24.0-SNAPSHOT" // CURRENT_OPENCENSUS_VERSION
3535

3636
def opencensusVersion = "0.23.0" // LATEST_OPENCENSUS_RELEASE_VERSION
37-
def grpcVersion = "1.21.0" // CURRENT_GRPC_VERSION
37+
def grpcVersion = "1.22.1" // CURRENT_GRPC_VERSION
3838
def prometheusVersion = "0.6.0"
3939
def jettyVersion = "9.4.17.v20190418"
4040
def tcnativeVersion = "2.0.20.Final"

exporters/metrics/ocagent/src/test/java/io/opencensus/exporter/metrics/ocagent/OcAgentMetricsExporterIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public void testExportMetrics() throws InterruptedException, IOException {
263263
for (Metric metricProto : metricProtos) {
264264
actualMetrics.add(metricProto.getMetricDescriptor().getName());
265265
}
266-
assertThat(actualMetrics).containsAllIn(expectedMetrics);
266+
assertThat(actualMetrics).containsAtLeastElementsIn(expectedMetrics);
267267
}
268268

269269
private static void registerAllViews() {

exporters/trace/ocagent/src/test/java/io/opencensus/exporter/trace/ocagent/TraceProtoUtilsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public void toSpanProto() {
261261
assertThat(span.getTimeEvents().getDroppedAnnotationsCount())
262262
.isEqualTo(DROPPED_ANNOTATIONS_COUNT);
263263
assertThat(span.getTimeEvents().getTimeEventList())
264-
.containsAllOf(annotationTimeEvent1, annotationTimeEvent2, sentTimeEvent, recvTimeEvent);
264+
.containsExactly(annotationTimeEvent1, annotationTimeEvent2, sentTimeEvent, recvTimeEvent);
265265
assertThat(span.getLinks()).isEqualTo(spanLinks);
266266
assertThat(span.getStatus()).isEqualTo(spanStatus);
267267
assertThat(span.getSameProcessAsParentSpan()).isEqualTo(BoolValue.of(true));

0 commit comments

Comments
 (0)