newJsonParser function is now unexported, must use NewParser(config)

This commit is contained in:
Max U
2018-06-28 15:35:20 -07:00
parent 7f2b2a08ae
commit 4db667573a
11 changed files with 81 additions and 51 deletions

View File

@@ -125,7 +125,12 @@ func TestRunParserAndGatherJSON(t *testing.T) {
k.acc = &acc
defer close(k.done)
k.parser, _ = parsers.NewJSONParser("kafka_json_test", []string{}, nil, nil)
config := &parsers.Config{
DataFormat: "json",
MetricName: "kafka_json_test",
}
k.parser, _ = parsers.NewParser(config)
go k.receiver()
in <- saramaMsg(testMsgJSON)
acc.Wait(1)