File tree Expand file tree Collapse file tree
gax-httpjson/src/test/java/com/google/api/gax/httpjson
gax/src/test/java/com/google/api/gax/tracing Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public class HttpJsonCallOptionsTest {
4141 private final HttpJsonCallOptions .Builder OPTIONS_BUILDER = HttpJsonCallOptions .newBuilder ();
4242
4343 @ Test
44- public void testTracer () {
44+ void testTracer () {
4545 ApiTracer tracer = Mockito .mock (ApiTracer .class );
4646 HttpJsonCallOptions options = OPTIONS_BUILDER .setTracer (tracer ).build ();
4747 assertThat (options .getTracer ()).isSameInstanceAs (tracer );
Original file line number Diff line number Diff line change 2929 */
3030package com .google .api .gax .tracing ;
3131
32+ import static com .google .common .truth .Truth .assertThat ;
33+
3234import org .junit .jupiter .api .Test ;
3335
3436public class BaseApiTracerTest {
@@ -161,9 +163,14 @@ public void testBatchRequestSent() {
161163 }
162164
163165 @ Test
164- public void testRecordResponseSize () {
165- BaseApiTracer tracer = new BaseApiTracer ();
166- tracer .recordResponseSize (10 );
167- // No-op, so nothing to verify.
166+ void testRecordResponseSize () {
167+ Throwable notExpected = null ;
168+ try {
169+ BaseApiTracer tracer = new BaseApiTracer ();
170+ tracer .recordResponseSize (10 );
171+ } catch (Exception ex ) {
172+ notExpected = ex ;
173+ }
174+ assertThat (notExpected ).isNull ();
168175 }
169176}
You can’t perform that action at this time.
0 commit comments