Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Update opencensus, guava, and Truth (#788)
Browse files Browse the repository at this point in the history
* Update opencensus, guava, and Truth

* fix tests
  • Loading branch information
elharo committed Sep 26, 2019
1 parent eef2e62 commit 730497c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dependencies.properties
Expand Up @@ -38,7 +38,7 @@ maven.com_google_auth_google_auth_library_oauth2_http=com.google.auth:google-aut
maven.com_google_auth_google_auth_library_credentials=com.google.auth:google-auth-library-credentials:0.17.1
maven.io_opencensus_opencensus_api=io.opencensus:opencensus-api:0.23.0
maven.io_opencensus_opencensus_contrib_grpc_metrics=io.opencensus:opencensus-contrib-grpc-metrics:0.23.0
maven.io_opencensus_opencensus_contrib_http_util=io.opencensus:opencensus-contrib-http-util:0.23.0
maven.io_opencensus_opencensus_contrib_http_util=io.opencensus:opencensus-contrib-http-util:0.24.0
maven.com_google_code_gson_gson=com.google.code.gson:gson:2.8.5
maven.com_google_guava_guava=com.google.guava:guava:28.1-android
maven.com_google_code_findbugs_jsr305=com.google.code.findbugs:jsr305:3.0.2
Expand Down Expand Up @@ -75,7 +75,7 @@ maven.io_netty_netty_tcnative_boringssl_static=io.netty:netty-tcnative-boringssl
maven.junit_junit=junit:junit:4.12
maven.org_mockito_mockito_core=org.mockito:mockito-core:2.21.0
maven.org_hamcrest_hamcrest_core=org.hamcrest:hamcrest-core:1.3
maven.com_google_truth_truth=com.google.truth:truth:0.44
maven.com_google_truth_truth=com.google.truth:truth:1.0
maven.com_googlecode_java_diff_utils_diffutils=com.googlecode.java-diff-utils:diffutils:1.3.0
maven.net_bytebuddy_byte_buddy=net.bytebuddy:byte-buddy:1.8.15
maven.org_objenesis_objenesis=org.objenesis:objenesis:2.6
Expand Up @@ -191,8 +191,10 @@ public void testGetSpanNameInvalid() {
IllegalArgumentException actualError = null;
try {
SpanName spanName = GrpcCallableFactory.getSpanName(descriptor);
Truth.assertWithMessage("Invalid method descriptor should not have a valid span name")
.fail("%s should not generate the spanName: %s", invalidName, spanName);
Truth.assertWithMessage(
"Invalid method descriptor should not have a valid span name: %s should not generate the spanName: %s",
invalidName, spanName)
.fail();
} catch (IllegalArgumentException e) {
actualError = e;
}
Expand Down
Expand Up @@ -85,8 +85,10 @@ public void testGetSpanNameInvalid() {
IllegalArgumentException actualError = null;
try {
SpanName spanName = HttpJsonCallableFactory.getSpanName(descriptor);
assertWithMessage("Invalid method descriptor should not have a valid span name")
.fail("%s should not generate the spanName: %s", invalidName, spanName);
assertWithMessage(
"Invalid method descriptor should not have a valid span name: %s should not generate the spanName: %s",
invalidName, spanName)
.fail();
} catch (IllegalArgumentException e) {
actualError = e;
}
Expand Down
Expand Up @@ -52,6 +52,7 @@ public class HttpJsonDirectCallableTest {
.setResponseParser(new FakeResponseParser())
.build();

@SuppressWarnings("unchecked")
@Test
public void testTimeout() {
HttpJsonChannel mockChannel = Mockito.mock(HttpJsonChannel.class);
Expand Down Expand Up @@ -87,6 +88,7 @@ public void testTimeout() {
assertThat(capturedCallOptions.getValue().getDeadline()).isAtMost(maxExpectedDeadline);
}

@SuppressWarnings("unchecked")
@Test
public void testTimeoutAfterDeadline() {
HttpJsonChannel mockChannel = Mockito.mock(HttpJsonChannel.class);
Expand Down Expand Up @@ -122,6 +124,7 @@ public void testTimeoutAfterDeadline() {
assertThat(capturedCallOptions.getValue().getDeadline()).isEqualTo(priorDeadline);
}

@SuppressWarnings("unchecked")
@Test
public void testTimeoutBeforeDeadline() {
HttpJsonChannel mockChannel = Mockito.mock(HttpJsonChannel.class);
Expand Down
Expand Up @@ -64,6 +64,7 @@ public class HttpRequestRunnableTest {
private static Set<String> queryParams =
Sets.newTreeSet(Lists.newArrayList("food", "size", "gibberish"));

@SuppressWarnings("unchecked")
@BeforeClass
public static void setUp() {
fakeCallOptions =
Expand Down

0 comments on commit 730497c

Please sign in to comment.