Skip to content

Commit

Permalink
tests: increase default socket timeout to 10s
Browse files Browse the repository at this point in the history
Previously the tests sometimes hung and eventually failed. This patch
increases the timeout the server waits for the test-client to connect
from 1 second to 10 seconds.
This should be enough for most systems.
  • Loading branch information
arogge committed Oct 16, 2019
1 parent 8a3e268 commit b716a6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/tests/bareos_test_sockets.cc
Expand Up @@ -53,7 +53,7 @@ static int create_listening_server_socket(int port)
}

struct timeval timeout;
timeout.tv_sec = 1; // after 1 seconds connect() will timeout
timeout.tv_sec = 10; // after 10 seconds connect() will timeout
timeout.tv_usec = 0;

if (setsockopt(listen_file_descriptor, SOL_SOCKET, SO_RCVTIMEO, &timeout,
Expand Down

0 comments on commit b716a6b

Please sign in to comment.