Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

fix flakyness of test_topic_statistics#1896

Merged
dirk-thomas merged 2 commits intonoetic-develfrom
dirk-thomas/fix-topic-statistics-test
Feb 25, 2020
Merged

fix flakyness of test_topic_statistics#1896
dirk-thomas merged 2 commits intonoetic-develfrom
dirk-thomas/fix-topic-statistics-test

Conversation

@dirk-thomas
Copy link
Copy Markdown
Member

@dirk-thomas dirk-thomas commented Feb 24, 2020

Fix flaky test: e.g. http://build.ros.org/view/Ndev/job/Ndev__ros_comm__ubuntu_focal_amd64/45/testReport/__main__/TestTopicStatistics/test_frequencies/

float division by zero
  File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/tmp/ws/src/ros_comm/test/test_rospy/test/rostest/test_topic_statistics.py", line 91, in test_frequencies
    self.assertTrue(self.frequency_acceptable('/very_slow_chatter', 0.5))
  File "/tmp/ws/src/ros_comm/test/test_rospy/test/rostest/test_topic_statistics.py", line 70, in frequency_acceptable
    found_freq = 1.0 / msg.period_mean.to_sec()

The first commit shows that this is actually the problem: http://build.ros.org/job/Npr_db__ros_comm__debian_buster_amd64/161/testReport/__main__/TestTopicStatistics/test_frequencies/

@dirk-thomas dirk-thomas self-assigned this Feb 24, 2020
@dirk-thomas dirk-thomas requested a review from sloretz February 24, 2020 23:20
@dirk-thomas dirk-thomas changed the title add assertion to narrow down error case fix flakyness of test_topic_statistics Feb 24, 2020
@dirk-thomas
Copy link
Copy Markdown
Member Author

The remaining failing tests are unfortunately also known to be flaky.

@dirk-thomas dirk-thomas merged commit cb6cb02 into noetic-devel Feb 25, 2020
@dirk-thomas dirk-thomas deleted the dirk-thomas/fix-topic-statistics-test branch February 25, 2020 00:00
dirk-thomas added a commit that referenced this pull request Mar 20, 2020
* add assertion to narrow down error case

* update test to ignore messages which are insufficient
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant