NewStreamConfig UTest fixes

Signed-off-by: Maximiliano Maccanti <maccanti@amazon.com>
This commit is contained in:
Maximiliano Maccanti 2018-12-21 22:24:40 +00:00
parent 687cbfa739
commit ad8a8e8a9e

View file

@ -78,8 +78,8 @@ func TestNewStreamConfig(t *testing.T) {
{"", groupName, "", "", "invalid flush interval", "", "", "", true, "invalid flush interval"},
{"", groupName, "", "", "", "invalid max buffered events", "", "", true, "invalid max buffered events"},
{"", groupName, "", "", "", "", "", "n{1001}", true, "invalid multiline pattern"},
{"", groupName, "", "", "15", "", "", "", true, "flush interval at 15"},
{"", groupName, "", "", "", "1024", "", "", true, "max buffered events at 1024"},
{"", groupName, "", "", "15", "", "", "", false, "flush interval at 15"},
{"", groupName, "", "", "", "1024", "", "", false, "max buffered events at 1024"},
}
for _, tc := range tests {
@ -108,6 +108,10 @@ func TestNewStreamConfig(t *testing.T) {
forceFlushIntervalAsInt, _ := strconv.Atoi(info.Config[forceFlushIntervalKey])
assert.Check(t, logStreamConfig.forceFlushInterval == time.Duration(forceFlushIntervalAsInt)*time.Second, "Unexpected forceFlushInterval")
}
if tc.maxBufferedEvents != "" {
maxBufferedEvents, _ := strconv.Atoi(info.Config[maxBufferedEventsKey])
assert.Check(t, logStreamConfig.maxBufferedEvents == maxBufferedEvents, "Unexpected maxBufferedEvents")
}
}
})
}