Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tilogaat committed Feb 19, 2015
1 parent 0d8ff88 commit 61cdbd7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void testSetSerialization() throws IOException {

@Test
public void testTimerSerialization() throws IOException {
String timerValue = "{\"type\":\"timer\",\"average\":214,\"count\":1,\"max\":214,\"min\":214,\"percentiles\":{\"98\":214,\"99\":214,\"75\":214,\"999\":214,\"50\":214},\"rate\":0.06666666666666667,\"sampleCount\":1,\"sum\":214,\"variance\":0.0}";
String timerValue = "{\"type\":\"timer\",\"average\":214,\"count\":1,\"max\":214,\"min\":214,\"percentiles\":{\"98\":214,\"99\":214,\"75\":214,\"999\":214,\"50\":214},\"rate\":0.06666666666666667,\"sampleCount\":1,\"sum\":214.0,\"variance\":0.0}";

TimerRollup timerDeserialized = mapper.readValue(timerValue, TimerRollup.class);
String timerSerialized = mapper.writeValueAsString(timerDeserialized);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class TimerSerializationTest {
public void testV1RoundTrip() throws IOException {
// build up a Timer
TimerRollup r0 = new TimerRollup()
.withSum(42d)
.withSum(Double.valueOf(42))
.withCountPS(23.32d)
.withAverage(56)
.withVariance(853.3245d)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void testTimerRollupSerialization() {
Assert.assertEquals(resultNode.get("mean").asLong(), rollup.getAverage().toLong());
Assert.assertEquals(resultNode.get("var").asDouble(), rollup.getVariance().toDouble());
Assert.assertEquals(resultNode.get("count").asLong(), rollup.getCount());
Assert.assertEquals(resultNode.get("sum").asLong(), rollup.getSum());
Assert.assertEquals(resultNode.get("sum").asDouble(), rollup.getSum());
Assert.assertEquals(resultNode.get("rate").asDouble(), rollup.getRate());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ACrZAlK4HoXrUTdAAABsOANs2wcCbAIBbmq8dJOYqopAAgNmb29uw/UoXI8qh0ADYmFybmFUUiegiaA/
AAAAAAAAAEVA2QJSuB6F61E3QAAAbDgDbNsHAmwCAW5qvHSTmKqKQAIDZm9vbsP1KFyPKodAA2Jhcm5hVFInoImgPw==

0 comments on commit 61cdbd7

Please sign in to comment.