You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Pinaki Poddar (JIRA)" <ji...@apache.org> on 2008/11/11 17:58:44 UTC

[jira] Created: (OPENJPA-766) Tests that currently fail should be committed to the repository

Tests that currently fail should be committed to the repository
---------------------------------------------------------------

                 Key: OPENJPA-766
                 URL: https://issues.apache.org/jira/browse/OPENJPA-766
             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.


[jira] Resolved: (OPENJPA-766) Tests that currently fail should be committed to the repository

Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pinaki Poddar resolved OPENJPA-766.
-----------------------------------

    Resolution: Fixed

The current commit fulfills the basic purpose. Further enhancement can be done in terms of  reporting the failed but ignored tests.

> Tests that currently fail should be committed to the repository
> ---------------------------------------------------------------
>
>                 Key: OPENJPA-766
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-766
>             Project: OpenJPA
>          Issue Type: Test
>            Reporter: Pinaki Poddar
>            Assignee: 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.


[jira] Commented: (OPENJPA-766) Tests that currently fail should be committed to the repository

Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646598#action_12646598 ] 

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;

@AllowFailure
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.
	@AllowFailure
	public void testFailedButIgnored() {
		fail();
	}
	
       // Failure of this test will be ignored. But not the error.  
	@AllowFailure
	public void testError() {
		int[] i = new int[2];
		i[5] = 5;
	}
	
      // Failure of this test will not be ignored
	@AllowFailure(false)
	public void testNotAllowFailure() {
		fail();
	}
}


> Tests that currently fail should be committed to the repository
> ---------------------------------------------------------------
>
>                 Key: OPENJPA-766
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-766
>             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.


[jira] Updated: (OPENJPA-766) Tests that currently fail should be committed to the repository

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donald Woods updated OPENJPA-766:
---------------------------------

    Affects Version/s: 2.0.0-M1
        Fix Version/s: 2.0.0-M1

> Tests that currently fail should be committed to the repository
> ---------------------------------------------------------------
>
>                 Key: OPENJPA-766
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-766
>             Project: OpenJPA
>          Issue Type: Test
>    Affects Versions: 2.0.0-M1
>            Reporter: Pinaki Poddar
>            Assignee: Pinaki Poddar
>             Fix For: 2.0.0-M1
>
>
> 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.


[jira] Commented: (OPENJPA-766) Tests that currently fail should be committed to the repository

Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647668#action_12647668 ] 

Milosz Tylenda commented on OPENJPA-766:
----------------------------------------

The website has a good page on how to write tests -  HowToWriteTestCaseForOpenJPA. However, the link to it is somewhat hidden in the Get Involved page. I think the project could benefit a bit from adding a link to HowToWriteTestCaseForOpenJPA to the Unit Tests page - these are similar topics and the Unit Tests page is easier to access currently.

Also, on http://openjpa.apache.org/development.html both Source Code and SourceAccess links point to the same page.


> Tests that currently fail should be committed to the repository
> ---------------------------------------------------------------
>
>                 Key: OPENJPA-766
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-766
>             Project: OpenJPA
>          Issue Type: Test
>            Reporter: Pinaki Poddar
>            Assignee: 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.


[jira] Assigned: (OPENJPA-766) Tests that currently fail should be committed to the repository

Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pinaki Poddar reassigned OPENJPA-766:
-------------------------------------

    Assignee: Pinaki Poddar

> Tests that currently fail should be committed to the repository
> ---------------------------------------------------------------
>
>                 Key: OPENJPA-766
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-766
>             Project: OpenJPA
>          Issue Type: Test
>            Reporter: Pinaki Poddar
>            Assignee: 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.