Skip to content

Commit

Permalink
Use Unix() int64 time for comparing timestamps in kafka consumer
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrc committed Oct 16, 2015
1 parent b28b4bd commit 73f1ed4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/kafka_consumer/kafka_consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ func TestEmitMetricsSendMetricsToAcc(t *testing.T) {
"region": "us-west",
}, point.Tags)

assert.Equal(t, time.Unix(0, 1422568543702900257), point.Time)
if time.Unix(0, 1422568543702900257).Unix() != point.Time.Unix() {
t.Errorf("Expected: %v, received %v\n",
time.Unix(0, 1422568543702900257).Unix(),
point.Time.Unix())
}
}

func TestEmitMetricsTimesOut(t *testing.T) {
Expand Down

0 comments on commit 73f1ed4

Please sign in to comment.