Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-738

ViewConfigTest relies on ordering of elements in a HashSet

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.3
    • 1.1.0
    • None
    • None
    • java version "1.8.0_20"
      Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
      Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

    Description

      I am observing the following two test failures when running DS agains Weld 2.2.5.Final and 3.0.0.Alpha1 on JDK 8

      testCallbackExecutionFolder(org.apache.deltaspike.test.jsf.impl.config.view.controller.uc005.ViewConfigTest): expected:<[param]1> but was:<[org.apache.deltaspike.test.jsf.impl.config.view.controller.uc005.SimpleTestAccessDecisionVoter]1>
      testCallbackExecutionPage(org.apache.deltaspike.test.jsf.impl.config.view.controller.uc005.ViewConfigTest): expected:<[param1]> but was:<[org.apache.deltaspike.test.jsf.impl.config.view.controller.uc005.SimpleTestAccessDecisionVoter2]>

      Looks like ViewConfigTest checks for order of the elements:
      https://github.com/apache/deltaspike/blob/master/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc005/ViewConfigTest.java#L214

      The elements are however placed in a HashSet which does not guarantee order:

      https://github.com/apache/deltaspike/blob/master/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc005/SimpleTestAccessDecisionVoter1.java#L29

      Attachments

        Activity

          People

            gpetracek Gerhard Petracek
            jharting Jozef Hartinger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: