use AddError everywhere (#2372)
This commit is contained in:
committed by
Daniel Nelson
parent
06199523ac
commit
5ebe43f86f
@@ -59,7 +59,7 @@ func TestReadsMetricsFromKafka(t *testing.T) {
|
||||
waitForPoint(&acc, t)
|
||||
|
||||
// Gather points
|
||||
err = k.Gather(&acc)
|
||||
err = acc.GatherError(k.Gather)
|
||||
require.NoError(t, err)
|
||||
if len(acc.Metrics) == 1 {
|
||||
point := acc.Metrics[0]
|
||||
|
||||
@@ -92,7 +92,7 @@ func TestRunParserAndGather(t *testing.T) {
|
||||
in <- saramaMsg(testMsg)
|
||||
acc.Wait(1)
|
||||
|
||||
k.Gather(&acc)
|
||||
acc.GatherError(k.Gather)
|
||||
|
||||
assert.Equal(t, acc.NFields(), 1)
|
||||
acc.AssertContainsFields(t, "cpu_load_short",
|
||||
@@ -111,7 +111,7 @@ func TestRunParserAndGatherGraphite(t *testing.T) {
|
||||
in <- saramaMsg(testMsgGraphite)
|
||||
acc.Wait(1)
|
||||
|
||||
k.Gather(&acc)
|
||||
acc.GatherError(k.Gather)
|
||||
|
||||
assert.Equal(t, acc.NFields(), 1)
|
||||
acc.AssertContainsFields(t, "cpu_load_short_graphite",
|
||||
@@ -130,7 +130,7 @@ func TestRunParserAndGatherJSON(t *testing.T) {
|
||||
in <- saramaMsg(testMsgJSON)
|
||||
acc.Wait(1)
|
||||
|
||||
k.Gather(&acc)
|
||||
acc.GatherError(k.Gather)
|
||||
|
||||
assert.Equal(t, acc.NFields(), 2)
|
||||
acc.AssertContainsFields(t, "kafka_json_test",
|
||||
|
||||
Reference in New Issue
Block a user