commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael A. Smith" <mich...@iammichael.org>
Subject Re: [collections] Tests failed with jdk1.4 and 1.3.1
Date Tue, 12 Mar 2002 14:30:37 GMT
On Tue, 12 Mar 2002, Lev Assinovsky wrote:
>      [java] There were 5 failures:

that's weird, there are only 4 failures listed.  

>      [java] 1) testEntrySetContainsProperMappings(org.apache.commons.collections.TestBeanMap)junit.framework.AssertionFailedEr
> ror: entrySet().contains(Object) must return true when map contains the mapping expected:<true>
but was:<false>
>      [java]     at org.apache.commons.collections.TestMap.testEntrySetContainsProperMappings(Unknown
Source)
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42)
>      [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28)
>      [java] 2) testEntrySetIterator(org.apache.commons.collections.TestBeanMap)junit.framework.AssertionFailedError:
Objects r
> eturned from entrySet().iterator() must be instances of Map.Entry.
>      [java]     at org.apache.commons.collections.TestMap.testEntrySetIterator(Unknown
Source)
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42)
>      [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28)
>      [java] 3) testEntrySetIteratorRemove(org.apache.commons.collections.TestBeanMap)junit.framework.AssertionFailedError:
ite
> rator should throw UnsupportedOperationException if remove is not allowed from the entrySet().iterator()
>      [java]     at org.apache.commons.collections.TestMap.testEntrySetIteratorRemove(Unknown
Source)
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42)
>      [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28)

These first three are the same for jdk 1.3, and are known problems.  I've 
been trying to get to them, but have been swamped with other stuff and 
haven't had the chance yet.

>      [java] 4) testIterator(org.apache.commons.collections.TestHashBag)junit.framework.AssertionFailedError:
First should be '
> A' expected:<A> but was:<B>
>      [java]     at org.apache.commons.collections.TestBag.testIterator(Unknown Source)
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42)
>      [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28)

I've seen this as well, and is actually a bad test.  The test is iterating 
over the results and expecting a certain order, however "hash" based 
collections usually do not guaruntee a particular ordering.  In this case, 
the hashing behavior between JDK 1.3 and JDK 1.4 is different so the 
iterator is returning the elements in a different order (thus the test 
fails).  

>      [java]
>      [java] FAILURES!!!
>      [java] Tests run: 748,  Failures: 5,  Errors: 1

there's that 5 again, but I only saw 4 listed...

[snip]
> Actually my intention was to use dbcp, that's why I got nightly

The above test failures shouldn't effect dbcp. 

regards,
michael


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message