diff options
author | Kristen Kozak <sebright@google.com> | 2018-02-07 19:37:29 -0800 |
---|---|---|
committer | Kristen Kozak <sebright@google.com> | 2018-02-07 19:37:29 -0800 |
commit | 9d1df32d9aa334863fc6228697e5081b96ce2843 (patch) | |
tree | 28d0e76586bb0ef5a4850c803e78907eac561be9 /testing | |
parent | d6a2027abfa344a75ecacdc8ca4e4c9d13d1c461 (diff) | |
download | opencensus-java-9d1df32d9aa334863fc6228697e5081b96ce2843.tar.gz |
Add '@since' Javadoc tag to all testing APIs (issue #864).
Diffstat (limited to 'testing')
-rw-r--r-- | testing/src/main/java/io/opencensus/testing/common/TestClock.java | 10 | ||||
-rw-r--r-- | testing/src/main/java/io/opencensus/testing/export/TestHandler.java | 7 |
2 files changed, 15 insertions, 2 deletions
diff --git a/testing/src/main/java/io/opencensus/testing/common/TestClock.java b/testing/src/main/java/io/opencensus/testing/common/TestClock.java index 7d88de43..b670cb7f 100644 --- a/testing/src/main/java/io/opencensus/testing/common/TestClock.java +++ b/testing/src/main/java/io/opencensus/testing/common/TestClock.java @@ -23,7 +23,11 @@ import io.opencensus.common.Timestamp; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.ThreadSafe; -/** A {@link Clock} that allows the time to be set for testing. */ +/** + * A {@link Clock} that allows the time to be set for testing. + * + * @since 0.5 + */ @ThreadSafe public final class TestClock extends Clock { private static final int NUM_NANOS_PER_SECOND = 1000 * 1000 * 1000; @@ -38,6 +42,7 @@ public final class TestClock extends Clock { * a good default, because it represents an invalid time. * * @return a clock initialized to a constant non-zero time. + * @since 0.5 */ public static TestClock create() { return new TestClock(); @@ -48,6 +53,7 @@ public final class TestClock extends Clock { * * @param time the initial time. * @return a new {@code TestClock} with the given time. + * @since 0.5 */ public static TestClock create(Timestamp time) { TestClock clock = new TestClock(); @@ -59,6 +65,7 @@ public final class TestClock extends Clock { * Sets the time. * * @param time the new time. + * @since 0.5 */ public synchronized void setTime(Timestamp time) { currentTime = validateNanos(time); @@ -68,6 +75,7 @@ public final class TestClock extends Clock { * Advances the time by a duration. * * @param duration the increase in time. + * @since 0.5 */ public synchronized void advanceTime(Duration duration) { currentTime = validateNanos(currentTime.addDuration(duration)); diff --git a/testing/src/main/java/io/opencensus/testing/export/TestHandler.java b/testing/src/main/java/io/opencensus/testing/export/TestHandler.java index 8f36b3bd..6d73aff1 100644 --- a/testing/src/main/java/io/opencensus/testing/export/TestHandler.java +++ b/testing/src/main/java/io/opencensus/testing/export/TestHandler.java @@ -25,7 +25,11 @@ import java.util.List; import javax.annotation.Nullable; import javax.annotation.concurrent.GuardedBy; -/** A {@link SpanExporter.Handler} for testing only. */ +/** + * A {@link SpanExporter.Handler} for testing only. + * + * @since 0.9 + */ public final class TestHandler extends SpanExporter.Handler { private final Object monitor = new Object(); @@ -50,6 +54,7 @@ public final class TestHandler extends SpanExporter.Handler { * @param numberOfSpans the number of minimum spans to be collected. * @return the list of exported {@link SpanData} objects, otherwise {@code null} if the current * thread is interrupted. + * @since 0.9 */ @Nullable public List<SpanData> waitForExport(int numberOfSpans) { |