-
Notifications
You must be signed in to change notification settings - Fork 5
Profiler test udp connection #51
base: master
Are you sure you want to change the base?
Conversation
baselqyqony
commented
Jul 8, 2021
- add TestUDPUsingSchedular test to ProfilerTest
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.
This tricky failure needs testing. It can happen that you run 100 times and only once it fails. For this, you can write a simple script.
|
||
#include <cstdio> | ||
#include <thread> | ||
|
||
#include "gtest/gtest.h" |
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.
Putting the test headers in front of anything else does make sense in this case.
test/ProfilerTest.cpp
Outdated
!packet_to_process.IsEmpty(); packet_to_process = pc.Poll()) { | ||
} | ||
// test receiving data | ||
EXPECT_EQ(Receive(), true); |
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.
This line fails in clang release (returns false). It would be good to find out, why.
The last one could trigger the same problem also in Debug. This means that clang, the compiler does something different which causes this problem. |
…ecieved bytes are different
I found the problem root cause, in the release on clang phase the buffer has different values from the expected ones, because of that the function receives returns false |
Thank @baselqyqony nice catch. I will look into it. I am creating an issue. |