Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-35685

Fix MTRotator intermittent unit test failure

    XMLWordPrintable

    Details

      Description

      Every day or so Jenkins has a failure in a ts_mtrotator unit test:

      tests/test_csc.py:142: in check_telemetry
         self.assertAlmostEqual(motors_data.current[0], desired_current, delta=slop)
      E   AssertionError: -5.0 != 0.0 within 1e-06 delta (5.0 difference)
      

      which then goes away again. The failure is in test_move after the move completes. It appears to be a race condition between the move ending and the telemetry not being updated accordingly.

      Fix the test to be more robust.

        Attachments

          Activity

          Hide
          rowen Russell Owen added a comment - - edited

          Other changes:

          • MTRotatorCsc.start: call super().start() first for compatibility with Kafka salobj
          • Jenkinsfile: change HOME to WHOME to fix the Jenkins jobs

          Pull request: https://github.com/lsst-ts/ts_mtrotator/pull/70

          Show
          rowen Russell Owen added a comment - - edited Other changes: MTRotatorCsc.start: call super().start() first for compatibility with Kafka salobj Jenkinsfile: change HOME to WHOME to fix the Jenkins jobs Pull request: https://github.com/lsst-ts/ts_mtrotator/pull/70
          Hide
          ttsai Te-Wei Tsai added a comment -

          Reviewed in GitHub.

          Show
          ttsai Te-Wei Tsai added a comment - Reviewed in GitHub.
          Hide
          rowen Russell Owen added a comment -

          Tagged ts_mtrotator v0.25.1

          Show
          rowen Russell Owen added a comment - Tagged ts_mtrotator v0.25.1

            People

            Assignee:
            rowen Russell Owen
            Reporter:
            rowen Russell Owen
            Reviewers:
            Te-Wei Tsai
            Watchers:
            Russell Owen, Te-Wei Tsai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.