Skip to content

Commit

Permalink
Improves lunar-devel jenkins test stability (backport to kinetic-deve…
Browse files Browse the repository at this point in the history
…l) (#1578)

* extend timeout for sensitive python test

* compression ratio test threshold relaxed

* removed accidental test race condition

* relaxes bag compression-ratio test threshold more
  • Loading branch information
meyerj authored and dirk-thomas committed Feb 1, 2019
1 parent fb6a6bd commit 4c4ecec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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

0 comments on commit 4c4ecec

Please sign in to comment.