8023215: test/java/util/Comparator/TypeTest.java not running (failing but reported as passing)

Henry Jen henry.jen at oracle.com
Mon Aug 19 14:57:45 UTC 2013


Uh, this one was wrote to be a regular jtreg test running with main, not a testNG test.

Thanks for looking into this.

Also I am wondering if this one still add any value, it was added to test the API when we had it like

<S super T> Comparator<S> thenComparing(Comparator<? super T> cmp)

Cheers,
Henry

On Aug 19, 2013, at 2:14 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> 
> I just refreshed my clone of code-tools/jtreg to pick up a few changes, including a number of fixes to the TestNG support.
> 
> With the updated jtreg then test/java/util/Comparator/TypeTest.java fails:
> 
> [TestNG] Running:
>  java/util/Comparator/TypeTest.java
> 
> test public static void TypeTest.main(java.lang.String[]): skip
> org.testng.TestNGException:
> Method main requires 1 parameters but 0 were supplied in the @Test annotation.
> 
> It turns out this has been failing (and so this test has not been running) since it was initially pushed, it's just that jtreg has been reporting it as passing.
> 
> Looking at the test now then it seems incomplete (although it matches the version in the lambda forest). For now I'd like to "enable it" via the attached patch so that it's not failing when running the java.util tests.
> 
> -Alan
> 
> diff --git a/test/java/util/Comparator/TypeTest.java b/test/java/util/Comparator/TypeTest.java
> --- a/test/java/util/Comparator/TypeTest.java
> +++ b/test/java/util/Comparator/TypeTest.java
> @@ -75,7 +75,7 @@
>         }
>     }
> 
> -    public static void main(String[] args) {
> +    public void testOrder() {
>         Manager m1 = new Manager("Manager", 2, 2000);
>         Manager m2 = new Manager("Manager", 4, 1300);




More information about the core-libs-dev mailing list