From a4354d83cc46717fa8e7abef70be93acded69728 Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Thu, 16 Apr 2020 10:43:25 +0200 Subject: [PATCH] Adjust tests for new behaviour of UdpReceiver --- core-writer/test/test_UdpRecvModule.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core-writer/test/test_UdpRecvModule.cpp b/core-writer/test/test_UdpRecvModule.cpp index dce4167..384d8ea 100644 --- a/core-writer/test/test_UdpRecvModule.cpp +++ b/core-writer/test/test_UdpRecvModule.cpp @@ -35,7 +35,8 @@ TEST(UdpRecvModule, simple_recv) this_thread::sleep_for(chrono::milliseconds(100)); - ASSERT_TRUE(ring_buffer.is_empty()); + // The first slot should be already reserved in the ring buffer. + ASSERT_FALSE(ring_buffer.is_empty()); auto send_socket_fd = socket(AF_INET,SOCK_DGRAM,0); ASSERT_TRUE(send_socket_fd >= 0); @@ -46,8 +47,6 @@ TEST(UdpRecvModule, simple_recv) send_udp_buffer.bunchid = 100; send_udp_buffer.debug = 1000; - ASSERT_TRUE(ring_buffer.is_empty()); - send_udp_buffer.framenum = 1; for (size_t i=0; i