teragrep / lsh_01

logstash-http-input to syslog bridge
https://teragrep.com
Apache License 2.0
0 stars 3 forks source link

Tests using a RELP server are slow #67

Closed 51-code closed 2 months ago

51-code commented 5 months ago

Describe the bug

Tests using a RELP server take a long time because the first connect() call to ManagedRelpConnection fails, starting a reconnect loop with a sleep time of relp.reconnectInterval. Not sure if this happens outside of the testing environment.

Very noticeable when creating multiple connections back to back.

Expected behavior

Should connect straight away to speed up tests.

How to reproduce

Run any test in EndToEndTest.java, notice that it takes just a bit longer to run than the reconnectInterval.

Screenshots

Software version

Desktop (please complete the following information if relevant):

Additional context

Workaround is to set relp.reconnectInterval to a lower value in unit tests.