refactor Speed up stream test
On windows the tests were taking minutes instead of seconds. This is because it's not possible to sleep for a short period of time on this OS. Until now the tests were only trying to respect the time interval between two consecutive packets. A packet was send, a sleep was done, etc... But a thread can't sleep for an exact period of time. It can only sleep for a minimum period of time. As a result the pcap was send slower than expected on every OS. After this commit, the tests are only trying to respect the time interval between the first and the current packets. A sleep is done when the packets are in advance, otherwise the packet are just send one after each other.
Showing
- LidarPlugin/Common/Network/vvPacketSender.cxx 79 additions, 0 deletionsLidarPlugin/Common/Network/vvPacketSender.cxx
- LidarPlugin/Common/Network/vvPacketSender.h 11 additions, 0 deletionsLidarPlugin/Common/Network/vvPacketSender.h
- LidarPlugin/StandAloneTools/PacketFileSender.cxx 6 additions, 69 deletionsLidarPlugin/StandAloneTools/PacketFileSender.cxx
- LidarPlugin/Testing/TestHelpers.cxx 74 additions, 104 deletionsLidarPlugin/Testing/TestHelpers.cxx
- LidarPlugin/Testing/TestHelpers.h 14 additions, 0 deletionsLidarPlugin/Testing/TestHelpers.h
Loading
-
mentioned in issue #30 (closed)
-
mentioned in merge request !150 (merged)
Please register or sign in to comment