MRUnit
  1. MRUnit
  2. MRUNIT-54

Driver.runTest throws RuntimeException should it throw AssertionError?

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Labels:
      None

      Description

      The difference is small but in maven tests show up as erred not failed.

        Activity

        Hide
        Jim Donofrio added a comment -

        Yes I agree we should change all test assert failures to throw AssertionError instead of mixing IOException and assert failures as RuntimeExceptions
        We just have to change throw new RuntimeException(buffer.toString()); to fail(buffer.toString()); in TestDriver and update the test to catch AssertionError

        Show
        Jim Donofrio added a comment - Yes I agree we should change all test assert failures to throw AssertionError instead of mixing IOException and assert failures as RuntimeExceptions We just have to change throw new RuntimeException(buffer.toString()); to fail(buffer.toString()); in TestDriver and update the test to catch AssertionError
        Hide
        Jarek Jarcec Cecho added a comment -

        +1 (I also agree that it would make more sense to use AssertionError rather than IOException or RuntimeException)

        Show
        Jarek Jarcec Cecho added a comment - +1 (I also agree that it would make more sense to use AssertionError rather than IOException or RuntimeException)
        Hide
        Jim Donofrio added a comment -

        Can we change this?

        Show
        Jim Donofrio added a comment - Can we change this?
        Hide
        Jim Donofrio added a comment -

        I am going to make this change, 3 of us are in agreement and no users have responded on mrunit-user since you sent the email 2 week ago on Feb 27

        Show
        Jim Donofrio added a comment - I am going to make this change, 3 of us are in agreement and no users have responded on mrunit-user since you sent the email 2 week ago on Feb 27
        Hide
        Brock Noland added a comment -

        Sounds good!

        Show
        Brock Noland added a comment - Sounds good!
        Hide
        Jim Donofrio added a comment -

        Changed validate to use JUnit fail method instead of throws RuntimeException
        Removed throws RuntimeException on runTests methods
        added ExpectedSuppliedException class to better test exceptions
        fixed test methods to use ExpectedSuppliedException to test for AssertionError along with correct message in the exception

        Show
        Jim Donofrio added a comment - Changed validate to use JUnit fail method instead of throws RuntimeException Removed throws RuntimeException on runTests methods added ExpectedSuppliedException class to better test exceptions fixed test methods to use ExpectedSuppliedException to test for AssertionError along with correct message in the exception
        Hide
        Jim Donofrio added a comment -

        committed in 1298706

        Show
        Jim Donofrio added a comment - committed in 1298706

          People

          • Assignee:
            Jim Donofrio
            Reporter:
            Brock Noland
          • Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development