Mesos
  1. Mesos
  2. MESOS-79

Python external test doesn't actually test that framework finished cleanly

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: python api, test
    • Labels:

      Description

      The Python example framework doesn't check the status returned by SchedulerDriver.run(), so if, for example, the framework is aborted, it will exit normally. The PythonFramework external test will interpret this normal exit as success when it should be a failure.

        Activity

        Mark Thomas made changes -
        Workflow jira [ 12641937 ] Mesos workflow [ 12741026 ]
        Andy Konwinski made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Andy Konwinski added a comment -

        I've just committed this. Thanks Charles!

        Show
        Andy Konwinski added a comment - I've just committed this. Thanks Charles!
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/2816/#review3189
        -----------------------------------------------------------

        Ship it!

        Looks great. I've tested this and it works.

        • Andy

        On 2011-11-12 08:49:35, Charles Reiss wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/2816/

        -----------------------------------------------------------

        (Updated 2011-11-12 08:49:35)

        Review request for mesos.

        Summary

        -------

        Calls sys.exit() with the result of SchedulerDriver.run() rather than ignoring the return value. Relies on 0 being the 'OK' status code.

        This addresses bug MESOS-79.

        https://issues.apache.org/jira/browse/MESOS-79

        Diffs

        -----

        src/examples/python/test_framework.py 0e4b14c

        Diff: https://reviews.apache.org/r/2816/diff

        Testing

        -------

        Thanks,

        Charles

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/2816/#review3189 ----------------------------------------------------------- Ship it! Looks great. I've tested this and it works. Andy On 2011-11-12 08:49:35, Charles Reiss wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/2816/ ----------------------------------------------------------- (Updated 2011-11-12 08:49:35) Review request for mesos. Summary ------- Calls sys.exit() with the result of SchedulerDriver.run() rather than ignoring the return value. Relies on 0 being the 'OK' status code. This addresses bug MESOS-79 . https://issues.apache.org/jira/browse/MESOS-79 Diffs ----- src/examples/python/test_framework.py 0e4b14c Diff: https://reviews.apache.org/r/2816/diff Testing ------- Thanks, Charles
        Charles Reiss made changes -
        Field Original Value New Value
        Assignee Charles Reiss [ woggle ]
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/2816/
        -----------------------------------------------------------

        Review request for mesos.

        Summary
        -------

        Calls sys.exit() with the result of SchedulerDriver.run() rather than ignoring the return value. Relies on 0 being the 'OK' status code.

        This addresses bug MESOS-79.
        https://issues.apache.org/jira/browse/MESOS-79

        Diffs


        src/examples/python/test_framework.py 0e4b14c

        Diff: https://reviews.apache.org/r/2816/diff

        Testing
        -------

        Thanks,

        Charles

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/2816/ ----------------------------------------------------------- Review request for mesos. Summary ------- Calls sys.exit() with the result of SchedulerDriver.run() rather than ignoring the return value. Relies on 0 being the 'OK' status code. This addresses bug MESOS-79 . https://issues.apache.org/jira/browse/MESOS-79 Diffs src/examples/python/test_framework.py 0e4b14c Diff: https://reviews.apache.org/r/2816/diff Testing ------- Thanks, Charles
        Charles Reiss created issue -

          People

          • Assignee:
            Charles Reiss
            Reporter:
            Charles Reiss
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development