Skip to content

Commit

Permalink
[HWKMETRICS-620] Update integration tests to remove/replace deprecate…
Browse files Browse the repository at this point in the history
…d fields from AvailabilityBucketPoint.
  • Loading branch information
Stefan Negrea committed Mar 10, 2017
1 parent 7096849 commit e4ff8f3
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 Red Hat, Inc. and/or its affiliates
* Copyright 2014-2017 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -100,7 +100,7 @@ class AvailabilityMetricStatisticsITest extends RESTTest {
start : buckets[0], end: buckets[0] + bucketSize, empty: true,
], [
start : buckets[1], end: buckets[1] + bucketSize, empty: false,
downtimeDuration: 0, lastDowntime: 0, uptimeRatio: 1.0, downtimeCount: 0,
downDuration: 0, lastNotUptime: 0, uptimeRatio: 1.0, notUpCount: 0,
], [
start : buckets[2], end: buckets[2] + bucketSize, empty: true
]
Expand Down Expand Up @@ -141,10 +141,10 @@ class AvailabilityMetricStatisticsITest extends RESTTest {
expectedData.add([
start : start.plusHours(step - 1).millis,
end : start.plusHours(step).millis,
downtimeDuration: minutes(15).toStandardDuration().millis,
lastDowntime : start.plusHours(step).millis,
downDuration: minutes(15).toStandardDuration().millis,
lastNotUptime : start.plusHours(step).millis,
uptimeRatio : 0.75,
downtimeCount : 15,
notUpCount : 15,
empty : false
]
)
Expand All @@ -159,10 +159,10 @@ class AvailabilityMetricStatisticsITest extends RESTTest {
assertEquals(expected.end, actual.end)
assertEquals(expected.empty, actual.empty)
if (!expected.empty) {
assertEquals(expected.downtimeDuration, actual.downtimeDuration)
assertEquals(expected.lastDowntime, actual.lastDowntime)
assertEquals(expected.downDuration, actual.downDuration)
assertEquals(expected.lastNotUptime, actual.lastNotUptime)
assertDoubleEquals(expected.uptimeRatio, actual.uptimeRatio)
assertEquals(expected.downtimeCount, actual.downtimeCount)
assertEquals(expected.notUpCount, actual.notUpCount)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 Red Hat, Inc. and/or its affiliates
* Copyright 2014-2017 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -680,8 +680,8 @@ class MetricsITest extends RESTTest {
lastNotUptime: 350,
uptimeRatio: 100 / 150,
notUpCount: 1,
downtimeDuration: 50,
lastDowntime: 350,
downDuration: 50,
lastNotUptime: 350,
empty: false,
adminDuration: 0,
unknownDuration: 0,
Expand All @@ -697,8 +697,8 @@ class MetricsITest extends RESTTest {
lastNotUptime: 0,
uptimeRatio: 1.0,
notUpCount: 0,
downtimeDuration: 0,
lastDowntime: 0,
downDuration: 0,
lastNotUptime: 0,
empty: false,
adminDuration: 0,
unknownDuration: 0,
Expand All @@ -716,8 +716,8 @@ class MetricsITest extends RESTTest {
lastNotUptime: 350,
uptimeRatio: 0.0,
notUpCount: 1,
downtimeDuration: 150,
lastDowntime: 350,
downDuration: 150,
lastNotUptime: 350,
empty: false,
adminDuration: 0,
unknownDuration: 0,
Expand All @@ -733,8 +733,8 @@ class MetricsITest extends RESTTest {
lastNotUptime: 0,
uptimeRatio: 1.0,
notUpCount: 0,
downtimeDuration: 0,
lastDowntime: 0,
downDuration: 0,
lastNotUptime: 0,
empty: false,
adminDuration: 0,
unknownDuration: 0,
Expand Down Expand Up @@ -1690,8 +1690,8 @@ class MetricsITest extends RESTTest {
lastNotUptime: 350,
uptimeRatio: 100 / 150,
notUpCount: 1,
downtimeDuration: 50,
lastDowntime: 350,
downDuration: 50,
lastNotUptime: 350,
empty: false,
adminDuration: 0,
unknownDuration: 0,
Expand All @@ -1707,8 +1707,8 @@ class MetricsITest extends RESTTest {
lastNotUptime: 0,
uptimeRatio: 1.0,
notUpCount: 0,
downtimeDuration: 0,
lastDowntime: 0,
downDuration: 0,
lastNotUptime: 0,
empty: false,
adminDuration: 0,
unknownDuration: 0,
Expand All @@ -1726,8 +1726,8 @@ class MetricsITest extends RESTTest {
lastNotUptime: 350,
uptimeRatio: 0.0,
notUpCount: 1,
downtimeDuration: 150,
lastDowntime: 350,
downDuration: 150,
lastNotUptime: 350,
empty: false,
adminDuration: 0,
unknownDuration: 0,
Expand All @@ -1743,8 +1743,8 @@ class MetricsITest extends RESTTest {
lastNotUptime: 0,
uptimeRatio: 1.0,
notUpCount: 0,
downtimeDuration: 0,
lastDowntime: 0,
downDuration: 0,
lastNotUptime: 0,
empty: false,
adminDuration: 0,
unknownDuration: 0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 Red Hat, Inc. and/or its affiliates
* Copyright 2014-2017 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -221,8 +221,8 @@ Actual: ${actual}
assertEquals(msg, expected.lastNotUptime, actual.lastNotUptime)
assertDoubleEquals(msg, expected.uptimeRatio, actual.uptimeRatio)
assertEquals(msg, expected.notUpCount, actual.notUpCount)
assertEquals(msg, expected.downtimeDuration, actual.downtimeDuration)
assertEquals(msg, expected.lastDowntime, actual.lastDowntime)
assertEquals(msg, expected.downDuration, actual.downDuration)
assertEquals(msg, expected.lastNotUptime, actual.lastNotUptime)
assertEquals(msg, expected.adminDuration, actual.adminDuration)
assertEquals(msg, expected.unknownDuration, actual.unknownDuration)
assertEquals(msg, expected.upDuration, actual.upDuration)
Expand Down

0 comments on commit e4ff8f3

Please sign in to comment.