test(inputs.syslog): Add timeout to closed socket test (#15461)
This commit is contained in:
parent
3e03f0aa10
commit
079c9d285a
|
|
@ -287,15 +287,13 @@ func TestCases(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSocketClosed(t *testing.T) {
|
func TestSocketClosed(t *testing.T) {
|
||||||
if runtime.GOOS == "windows" {
|
|
||||||
t.Skip("Skipping test as very flaky on Windows")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setup the plugin
|
// Setup the plugin
|
||||||
plugin := &Syslog{
|
plugin := &Syslog{
|
||||||
Address: "tcp://127.0.0.1:0",
|
Address: "tcp://127.0.0.1:0",
|
||||||
Config: socket.Config{},
|
Config: socket.Config{
|
||||||
Log: testutil.Logger{},
|
ReadTimeout: config.Duration(10 * time.Millisecond),
|
||||||
|
},
|
||||||
|
Log: testutil.Logger{},
|
||||||
}
|
}
|
||||||
require.NoError(t, plugin.Init())
|
require.NoError(t, plugin.Init())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue