diff options
| author | Hailong Wen <hailongwen@google.com> | 2017-11-20 22:03:09 -0800 |
|---|---|---|
| committer | Hailong Wen <hailongwen@google.com> | 2017-11-20 22:03:09 -0800 |
| commit | 5f5afe8f305fddc74170c91428e6ab372b572705 (patch) | |
| tree | 7494106c090458fb1de1f2408fdbdc828b794346 /api/src/test | |
| parent | d89b938b29497ad234a466c97dedd3002c7aa414 (diff) | |
| download | platform_external_opencensus-java-5f5afe8f305fddc74170c91428e6ab372b572705.tar.gz platform_external_opencensus-java-5f5afe8f305fddc74170c91428e6ab372b572705.tar.bz2 platform_external_opencensus-java-5f5afe8f305fddc74170c91428e6ab372b572705.zip | |
Addressing sebright's comments.
1. Returns the same NoopExportComponent and NoopSampledSpanStore.
2. Correct outdated javadoc.
3. Change visibility of getNoopRunningSpanStore().
4. Make empty Summary constant.
5. Returns immutable copy of registeredSpanNames when calling
getRegisteredSpanNamesForCollection().
Diffstat (limited to 'api/src/test')
| -rw-r--r-- | api/src/test/java/io/opencensus/trace/export/NoopSampledSpanStoreTest.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/api/src/test/java/io/opencensus/trace/export/NoopSampledSpanStoreTest.java b/api/src/test/java/io/opencensus/trace/export/NoopSampledSpanStoreTest.java index 97bc6ea9..e18621ac 100644 --- a/api/src/test/java/io/opencensus/trace/export/NoopSampledSpanStoreTest.java +++ b/api/src/test/java/io/opencensus/trace/export/NoopSampledSpanStoreTest.java @@ -34,7 +34,7 @@ import org.junit.runners.JUnit4; public final class NoopSampledSpanStoreTest { @Rule public final ExpectedException thrown = ExpectedException.none(); - private final SampledSpanStore.PerSpanNameSummary emptyPerSpanNameSummary = + private static final SampledSpanStore.PerSpanNameSummary EMPTY_PER_SPAN_NAME_SUMMARY = SampledSpanStore.PerSpanNameSummary.create( Collections.<SampledSpanStore.LatencyBucketBoundaries, Integer>emptyMap(), Collections.<CanonicalCode, Integer>emptyMap()); @@ -53,16 +53,16 @@ public final class NoopSampledSpanStoreTest { summary = sampledSpanStore.getSummary(); assertThat(summary.getPerSpanNameSummary()) .containsExactly( - "TestSpan1", emptyPerSpanNameSummary, - "TestSpan2", emptyPerSpanNameSummary, - "TestSpan3", emptyPerSpanNameSummary); + "TestSpan1", EMPTY_PER_SPAN_NAME_SUMMARY, + "TestSpan2", EMPTY_PER_SPAN_NAME_SUMMARY, + "TestSpan3", EMPTY_PER_SPAN_NAME_SUMMARY); // should unregister specific spanNames sampledSpanStore.unregisterSpanNamesForCollection( Collections.unmodifiableList(Lists.newArrayList("TestSpan1", "TestSpan3"))); summary = sampledSpanStore.getSummary(); assertThat(summary.getPerSpanNameSummary()) - .containsExactly("TestSpan2", emptyPerSpanNameSummary); + .containsExactly("TestSpan2", EMPTY_PER_SPAN_NAME_SUMMARY); } @Test |
