NewStreamConfig UTest fixes
Signed-off-by: Maximiliano Maccanti <maccanti@amazon.com>
This commit is contained in:
parent
687cbfa739
commit
ad8a8e8a9e
1 changed files with 6 additions and 2 deletions
|
@ -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")
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue