Skip to content
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

Improves lunar-devel jenkins test stability #1135

Merged
merged 4 commits into from
Aug 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/test_rosbag/bag_migration_tests/test/random_play.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def test_random_play(self):
# these bounds are much larger than they ought to be, but
# you never know with a heavily loaded system.
self.assertTrue(input_time - expect_time > -.5)
self.assertTrue(abs(input_time - expect_time) < .5)
self.assertTrue(abs(input_time - expect_time) < 5.0)
break

if not msg_match:
Expand Down
4 changes: 2 additions & 2 deletions test/test_rosbag/test/test_bag.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ def test_get_compression_info(self):

# the value varies each run, I suspect based on rand, but seems
# to generally be around 960 to 980 on my comp
self.assertLess(info.compressed, 1000)
self.assertGreater(info.compressed, 900)
self.assertLess(info.compressed, 1050)
self.assertGreater(info.compressed, 850)

def test_get_time(self):
fn = '/tmp/test_get_time.bag'
Expand Down
4 changes: 2 additions & 2 deletions test/test_roscpp/test/test_callback_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,8 @@ void ConditionObject::add()
{
while(!condition_stop.load())
{
if(condition_sync.load())
if(condition_sync.load() && queue->isEmpty())
{
condition_sync.store(false);
condition_one.store(true);
id++;
queue->addCallback(boost::make_shared<RaceConditionCallback>(this, &id), id);
Expand All @@ -458,6 +457,7 @@ TEST(CallbackQueue, raceConditionCallback)
boost::thread t(boost::bind(&ConditionObject::add, &condition_object));
for(unsigned int i = 0; i < 1000000; ++i)
{
condition_object.condition_sync.store(false);
if (queue.callOne() == CallbackQueue::Called)
{
if(condition_object.condition_one.load())
Expand Down