Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.7.0
    • Fix Version/s: 0.8.0
    • Component/s: tests
    • Labels:
      None

      Description

      There are situations where test order is important and its lack causes test failure. E.g. I see a number of failures in quota testing in hadoop smokes caused by wrong order of the test cases.

      iTest currently has a mechanism to order parametrized tests. However, parametrization seems like an overkill in some cases. For those a simple ordering will be sufficient.

      1. BIGTOP-1224.patch
        5 kB
        Konstantin Boudnik

        Issue Links

          Activity

          Hide
          Konstantin Boudnik added a comment -

          This does the trick

          Show
          Konstantin Boudnik added a comment - This does the trick
          Hide
          jay vyas added a comment -

          Okay so to use this all we have to do is extend OrderedTest and add -1/0/1 as annotations? If so thats a nice utility to have.

          But, just a thought, do we really want to encourage people to write dependent unit tests? it could lead to alot of very unmodular tests.

          Show
          jay vyas added a comment - Okay so to use this all we have to do is extend OrderedTest and add -1/0/1 as annotations? If so thats a nice utility to have. But, just a thought, do we really want to encourage people to write dependent unit tests? it could lead to alot of very unmodular tests.
          Hide
          Konstantin Boudnik added a comment -

          You are not limited but -1/0/1 - you can use any integer values essentially.
          Wrt encouragement: there's a class of tests that must have it. Any test that requires a certain sequence of states - e.g. package validation and such - would benefit from it. We already have a more complex ordering support combined with parametrization. So if someone wants to use it - they will. The way to prevent it is peer review process, not technology limitation, I think.

          Show
          Konstantin Boudnik added a comment - You are not limited but -1/0/1 - you can use any integer values essentially. Wrt encouragement: there's a class of tests that must have it. Any test that requires a certain sequence of states - e.g. package validation and such - would benefit from it. We already have a more complex ordering support combined with parametrization. So if someone wants to use it - they will. The way to prevent it is peer review process, not technology limitation, I think.
          Hide
          Roman Shaposhnik added a comment -

          +1. I think for as long as we have a more complex version of this in place – this simplified one makes sense. Like Cos said – we should be on a lookout for not encouraging its use, but in some scenarios it may be the lesser of evils.

          Show
          Roman Shaposhnik added a comment - +1. I think for as long as we have a more complex version of this in place – this simplified one makes sense. Like Cos said – we should be on a lookout for not encouraging its use, but in some scenarios it may be the lesser of evils.
          Hide
          jay vyas added a comment -

          +1 , so does this JIRA need any more work? Looks done to me. cos i dont mind testing this for you if you havent already.

          Show
          jay vyas added a comment - +1 , so does this JIRA need any more work? Looks done to me. cos i dont mind testing this for you if you havent already.
          Hide
          Konstantin Boudnik added a comment -

          I have a unit test in place and it seems to be done-done. But feel free to give it a spin if you have a cycle or two: always appreciated!

          Show
          Konstantin Boudnik added a comment - I have a unit test in place and it seems to be done-done. But feel free to give it a spin if you have a cycle or two: always appreciated!
          Hide
          Konstantin Boudnik added a comment -

          Committed to the master

          Show
          Konstantin Boudnik added a comment - Committed to the master

            People

            • Assignee:
              Konstantin Boudnik
              Reporter:
              Konstantin Boudnik
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development