aboutsummaryrefslogtreecommitdiff
path: root/api/src/test/java
diff options
context:
space:
mode:
authorYang Song <songy23@users.noreply.github.com>2018-03-07 14:51:17 -0800
committerGitHub <noreply@github.com>2018-03-07 14:51:17 -0800
commitb28e6efbf8d36304cae8977e83faf1f47b4d5c69 (patch)
treef1744f08ba8322e26d05efe6fb8681c6b7621a41 /api/src/test/java
parent35bf957b19c9775eec129e62f1122a7ebe5f595b (diff)
downloadopencensus-java-b28e6efbf8d36304cae8977e83faf1f47b4d5c69.tar.gz
Deprecate Window and WindowData. (#1018)
* Deprecate Window and WindowType in Stats APIs * Window and WindowData will continue to be NonNull * Suppress warnings for impl, exporter and zpages. * NoopStats should continue to use old method.
Diffstat (limited to 'api/src/test/java')
-rw-r--r--api/src/test/java/io/opencensus/stats/NoopViewManagerTest.java16
1 files changed, 4 insertions, 12 deletions
diff --git a/api/src/test/java/io/opencensus/stats/NoopViewManagerTest.java b/api/src/test/java/io/opencensus/stats/NoopViewManagerTest.java
index 4aaa60dc..44c7626f 100644
--- a/api/src/test/java/io/opencensus/stats/NoopViewManagerTest.java
+++ b/api/src/test/java/io/opencensus/stats/NoopViewManagerTest.java
@@ -105,6 +105,8 @@ public final class NoopViewManagerTest {
ViewData viewData = viewManager.getView(VIEW_NAME);
assertThat(viewData.getView()).isEqualTo(view);
assertThat(viewData.getAggregationMap()).isEmpty();
+ assertThat(viewData.getStart()).isEqualTo(Timestamp.create(0, 0));
+ assertThat(viewData.getEnd()).isEqualTo(Timestamp.create(0, 0));
assertThat(viewData.getWindowData())
.isEqualTo(CumulativeData.create(Timestamp.create(0, 0), Timestamp.create(0, 0)));
}
@@ -171,23 +173,13 @@ public final class NoopViewManagerTest {
ViewManager viewManager = NoopStats.newNoopViewManager();
View view1 =
View.create(
- View.Name.create("View 1"),
- VIEW_DESCRIPTION,
- MEASURE,
- AGGREGATION,
- Arrays.asList(KEY),
- CUMULATIVE);
+ View.Name.create("View 1"), VIEW_DESCRIPTION, MEASURE, AGGREGATION, Arrays.asList(KEY));
viewManager.registerView(view1);
Set<View> exported = viewManager.getAllExportedViews();
View view2 =
View.create(
- View.Name.create("View 2"),
- VIEW_DESCRIPTION,
- MEASURE,
- AGGREGATION,
- Arrays.asList(KEY),
- CUMULATIVE);
+ View.Name.create("View 2"), VIEW_DESCRIPTION, MEASURE, AGGREGATION, Arrays.asList(KEY));
thrown.expect(UnsupportedOperationException.class);
exported.add(view2);
}