Uploaded image for project: 'Commons BeanUtils'
  1. Commons BeanUtils
  2. BEANUTILS-36

test.wrap.dynabean fails because testSetIndexedValues runs before testGetIndexedValues

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6
    • 1.8.0
    • None
    • None
    • Operating System: All
      Platform: All

    • 34824

    Description

      The commons beanutils test.wrap.dynabean build target gives me this error -

      test.wrap.dynabean:
      [echo] Running WrapDynaBean tests ...
      [java] ........................F...........
      [java] Time: 0.39
      [java] There was 1 failure:
      [java] 1)
      testGetIndexedValues(org.apache.commons.beanutils.WrapDynaBeanTestCase)junit.framework.AssertionFailedError:
      listIndexed 2 threw junit.framework.ComparisonFailure: listIndexed returned
      correct 2 expected:<String...> but was:<New Value...>
      [java] at
      org.apache.commons.beanutils.BasicDynaBeanTestCase.testGetIndexedValues
      (BasicDynaBeanTestCase.java:407)
      [java] at java.lang.reflect.Method.invoke0 (Method.java)
      [java] at java.lang.reflect.Method.invoke (Method.java:255)

      [java] FAILURES!!!
      [java] Tests run: 35, Failures: 1, Errors: 0

      I guess the problem is junit runs test cases in bottom to top order, so
      org.apache.commons.beanutils.BasicDynaBeanTestCase.testSetIndexedValues
      (BasicDynaBeanTestCase.java:782) runs before
      org.apache.commons.beanutils.BasicDynaBeanTestCase.testGetIndexedValues
      (BasicDynaBeanTestCase.java:371) - & bean.get("listIndexed", 2) is "New Value 2"
      instead of "String 2"

      Does junit allow stipulation of test cases' order? Or stipulation that
      testSetIndexedValues depends on testGetIndexedValues running first?

      I used jikes 1.22 & kaffe 1.1.5

      Many thanks for your work on this valuable software!

      Jack

      Attachments

        Activity

          People

            Unassigned Unassigned
            ms419@freezone.co.uk ms419
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: