__matthewHawthorne wrote:


Phil Steitz wrote:

__matthewHawthorne wrote:

Instead of removing it, is it possible to modify the test to "expect" the failure? I'm not familiar with the test or class that you're speaking of, but sometimes it's nice to keep tests like this around.

Maybe catch an expected RuntimeException, or change an assertTrue to an assertFalse, etc.?



The problem is that the test case testNestedBroken in o.a.c.l.enum.EnumTest is expecting "broken" behavior which does not occur under (Sun Linux) jdk 1.4.2. There is not much else in the test case. That's why I suggested removing it.

Phil


Ah, now I understand. Since it's such a specific test, you're probably right, it makes sense to remove it. Either that, or perhaps you could use SystemUtils to only run the test if it's on the expected version and platform.


I have now tried with JDK 1.4.1 and am seeing the same result. The first assertion in EnumTest.testNestedBroken fails:


 public void testNestedBroken() {
   List list = new ArrayList(NestBroken.ColorEnum.getEnumList());
   assertEquals(0, list.size());  // no enums!!! <--- FAILS for me
   // this is BROKEN because the enum constants are defined in a DIFFERENT
   // class from getEnumList(). Once NestBroken class is referenced,
   // and thus class loaded with its enum constants, the getEnumList works

This fails when the tests are run from Ant or Maven, SUN Linux JDKs 1.4.1_06, 1.4.2-b28. The list has size 3, which is what it "should" have (i.e., the broken behavior is not happening).

I don't want to just remove the test, since it is supposed to be illustrating a problem referenced in PR #23374.

Any ideas on how to fix this?

Looks like the nightly build is working, btw. What platform and JDK does the nightly build use?

Phil


--------------------------------------------------------------------- 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