On Thu, 27 Nov 2003 [EMAIL PROTECTED] wrote:

> Good point, thanks for solving the mystery.  I've updated the test to not
> depend on the hashmap order.

Cool. Works for me. :-)

--
Martin Cooper


>
> Don
>
> > I'm also getting a failure on TestActionConfigMatcher (using Ant build):
> >
> > Name isn't correct
> > junit.framework.AssertionFailedError: Name isn't correct
> > at
> > org.apache.struts.config.TestActionConfigMatcher.testCheckSubstitutionsM
> > atch(TestActionConfigMatcher.java:202)
> > ...
> >
> > cfg.getName() is returning 'name2', but the test expects 'name'
> >
> > fConfigs contains:
> > [0] = name2
> > [1] = name
> >
> > The problem seems to be that the test relies on the order of the array
> > elements but ActionConfig stores the configs in a HashMap which does not
> > return its values collection in a guaranteed order. I would have
> > expected the failure to be intermittent, but it fails consistently for
> > me. Maybe in practice the order is consistent for a platform, JDK, day
> > of the week etc. etc. :-)
> >
> > As an experiment, I changed the HashMap to a TreeMap, and the tests
> > pass. I don't know if this would have any knock on effects elsewhere
> > though. Might be better to rethink the test so it doesn't rely on the
> > ordering. Or even just drop that section since it's really only testing
> > findForwardConfigs(), not the matcher.
> >
> >
> > Steve
> >
> >
> >
> >> -----Original Message-----
> >> From: Don Brown [mailto:[EMAIL PROTECTED]
> >> Sent: November 27, 2003 9:36 PM
> >> To: Struts Developers List
> >> Subject: Re: Maven test run
> >>
> >>
> >> Hmmm...I just updated, uncommented those two lines, and ran "ant
> >> test.junit" - all tests passed.  Anyone else?
> >>
> >> Don
> >>
> >> On Thu, 27 Nov 2003, Ted Husted wrote:
> >>
> >> > When I run the maven jar target, the upload tests fail
> >> > (MultipartTestSuite).
> >> >
> >> > But, when I run the ant test.junit test, only the
> >> > TestActionConfigMatcher test fails.
> >> >
> >> > Is it me, or do others share this experience?
> >> >
> >> > If so, any ideas as to why this would be?
> >> >
> >> > -Ted.
> >> >
> >> >
> >> >
> >> >
> >> ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > For additional commands, e-mail: [EMAIL PROTECTED]
> >> >
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to