openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <>
Subject [jira] Commented: (OPENJPA-766) Tests that currently fail should be committed to the repository
Date Tue, 11 Nov 2008 17:10:44 GMT


Pinaki Poddar commented on OPENJPA-766:

The tests can now be annotated with following rule:
  1. Test Case can be annotated at class or method level with @AllowFailure(true|false)
   2. Method level annotation has higher precedence than the class level annotation.
   3. The failures in the test method are ignored not the error. 

See the example below:

package org.apache.openjpa.persistence.test;

public class TestAllowFailure extends SingleEMFTestCase {

    // No annotation. If the test fails then it will be ignored due to the class level annotation.
     public void testSomething() {...}

      // Failure of ths test will be ignored.
	public void testFailedButIgnored() {
       // Failure of this test will be ignored. But not the error.  
	public void testError() {
		int[] i = new int[2];
		i[5] = 5;
      // Failure of this test will not be ignored
	public void testNotAllowFailure() {

> Tests that currently fail should be committed to the repository
> ---------------------------------------------------------------
>                 Key: OPENJPA-766
>                 URL:
>             Project: OpenJPA
>          Issue Type: Test
>            Reporter: Pinaki Poddar
> Current surefire test harness fails if any of the tests fails. Surefire allows tests
to be ignored but the problem with that approach is the tests to be ignored are mentioned
separately via build script .
> A mechanics can be provided for OpenJPA tests that annotates a TestCase or specific methods
such that failures of these tests are ignored.
> This facility will help people to contribute tests in the repository that demonstrates
a bug or Test Driven Development.  

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message