You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Jozef Hartinger (JIRA)" <ji...@apache.org> on 2014/10/06 10:58:33 UTC

[jira] [Created] (DELTASPIKE-738) ViewConfigTest relies on ordering of elements in a HashSet

Jozef Hartinger created DELTASPIKE-738:
------------------------------------------

             Summary: ViewConfigTest relies on ordering of elements in a HashSet
                 Key: DELTASPIKE-738
                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-738
             Project: DeltaSpike
          Issue Type: Bug
    Affects Versions: 1.0.3
         Environment: 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)
            Reporter: Jozef Hartinger
             Fix For: 1.0.4


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

{quote}
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]>
{quote}

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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)