Skip to content
Snippets Groups Projects
Commit 6c5649bd authored by Nicolas Pope's avatar Nicolas Pope
Browse files

WIP More changes to unit tests

parent e2d0804a
No related branches found
No related tags found
1 merge request!333Resolves #373 Frameset timestamp errors
Pipeline #29057 failed
...@@ -210,11 +210,13 @@ TEST_CASE( "Multi-thread stability testing" ) { ...@@ -210,11 +210,13 @@ TEST_CASE( "Multi-thread stability testing" ) {
auto h = receiver->onFrameSet([&count,&result](const ftl::data::FrameSetPtr &fs) { auto h = receiver->onFrameSet([&count,&result](const ftl::data::FrameSetPtr &fs) {
LOG(INFO) << "FS RECV: " << fs->timestamp(); LOG(INFO) << "FS RECV: " << fs->timestamp();
count++; count++;
if (result) REQUIRE( result->timestamp() <= fs->timestamp()-20 ); if (result) {
REQUIRE( result->timestamp() <= fs->timestamp()-20 );
REQUIRE( fs->frames.size() == 2 ); REQUIRE( fs->frames.size() == 2 );
REQUIRE( fs->isComplete() ); REQUIRE( fs->isComplete() );
REQUIRE( fs->frames[0].hasChannel(Channel::Colour) ); REQUIRE( fs->frames[0].hasChannel(Channel::Colour) );
REQUIRE( fs->frames[1].hasChannel(Channel::Colour) ); REQUIRE( fs->frames[1].hasChannel(Channel::Colour) );
}
result = fs; result = fs;
return true; return true;
}); });
...@@ -269,6 +271,8 @@ TEST_CASE( "Multi-thread stability testing" ) { ...@@ -269,6 +271,8 @@ TEST_CASE( "Multi-thread stability testing" ) {
ftl::timer::reset(); ftl::timer::reset();
ftl::timer::setInterval(50); ftl::timer::setInterval(50);
ftl::pool.clear_queue();
while (ftl::pool.n_idle() != ftl::pool.size()) std::this_thread::sleep_for(std::chrono::milliseconds(10));
delete receiver; delete receiver;
delete sender; delete sender;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment