-
-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unit test for server timeout. #277
Conversation
I made a mental note a couple days ago about the fact that timeout isn't being tested, but you beat me to it 😂 |
Any ideas why it's not working? I suspect the problem in these lines:
Could it be that the CI takes longer than 2 seconds to transfer the message and thus the |
I'm looking into it now |
That's what I've thought too... Works on my machine locally. |
Signed-off-by: Luca Schlecker <[email protected]>
db56038
to
b47e0ad
Compare
Interesting, I've made the timings looser and now the test passes... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, tests are working, only part of timer not being tested is a case where io_service
doesn't exist. The only thing I have to complain about is styling, but that should be fixed soon with clang-format. Great work!
Sorry about the style, Crow's written in a different style to mine (which is based on Google's style), and thus autoformat can't really help me. Yes, should be fixed with clang-format. |
And I honestly still can't figure out what that I am tempted to just leave it out in my small rework of the |
I'm guessing it's for redundancy, so that the timer doesn't execute any timeout callbacks if there is no |
No worries, I've already written a new clang-format file, I'm just struggling with automated messages showing formatting errors when running CI. |
Well, functions get executed by asking a |
Signed-off-by: Luca Schlecker [email protected]
This is a preparation for my work on
dumb_timer_queue
(#264 and thus #273).It tries to test the timeout value by checking if the tcp socket reaches
eof
in the specified amount of time indicating that the server closed the connection.