Refactor InfluxDB listener (#6974)

Use streaming parser in InfluxDB listener
This commit is contained in:
reimda
2020-03-04 11:13:44 -07:00
committed by GitHub
parent ab8438dcc6
commit a0276385b1
21 changed files with 19898 additions and 18303 deletions

View File

@@ -13,7 +13,7 @@ import (
"github.com/stretchr/testify/require"
)
var TimeFunc = func() time.Time {
var testTimeFunc = func() time.Time {
return time.Unix(0, 0)
}
@@ -528,7 +528,7 @@ func TestDropWizard(t *testing.T) {
map[string]interface{}{
"value": 42.0,
},
TimeFunc(),
testTimeFunc(),
),
),
},
@@ -547,7 +547,7 @@ func TestDropWizard(t *testing.T) {
map[string]interface{}{
"value": 42.0,
},
TimeFunc(),
testTimeFunc(),
),
),
},
@@ -573,7 +573,7 @@ func TestDropWizard(t *testing.T) {
map[string]interface{}{
"value": 42.0,
},
TimeFunc(),
testTimeFunc(),
),
),
},
@@ -584,7 +584,7 @@ func TestDropWizard(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
parser := NewParser()
parser.SetTimeFunc(TimeFunc)
parser.SetTimeFunc(testTimeFunc)
metrics, err := parser.Parse(tt.input)
tt.errFunc(t, err)