From cafb22d14567ecf08b46b546a048ac3d72224eda Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Fri, 22 Sep 2017 17:18:25 -0700 Subject: [PATCH] Fix unittest for golang 1.9 --- metric/metric_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/metric/metric_test.go b/metric/metric_test.go index db71bf92a..062399d6e 100644 --- a/metric/metric_test.go +++ b/metric/metric_test.go @@ -31,7 +31,7 @@ func TestNewMetric(t *testing.T) { assert.Equal(t, tags, m.Tags()) assert.Equal(t, fields, m.Fields()) assert.Equal(t, "cpu", m.Name()) - assert.Equal(t, now, m.Time()) + assert.Equal(t, now.UnixNano(), m.Time().UnixNano()) assert.Equal(t, now.UnixNano(), m.UnixNano()) } @@ -414,7 +414,7 @@ func TestNewGaugeMetric(t *testing.T) { assert.Equal(t, tags, m.Tags()) assert.Equal(t, fields, m.Fields()) assert.Equal(t, "cpu", m.Name()) - assert.Equal(t, now, m.Time()) + assert.Equal(t, now.UnixNano(), m.Time().UnixNano()) assert.Equal(t, now.UnixNano(), m.UnixNano()) } @@ -436,7 +436,7 @@ func TestNewCounterMetric(t *testing.T) { assert.Equal(t, tags, m.Tags()) assert.Equal(t, fields, m.Fields()) assert.Equal(t, "cpu", m.Name()) - assert.Equal(t, now, m.Time()) + assert.Equal(t, now.UnixNano(), m.Time().UnixNano()) assert.Equal(t, now.UnixNano(), m.UnixNano()) }