[ 
https://issues.apache.org/jira/browse/OPENJPA-3007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18144345#comment-18144345
 ] 

ASF subversion and git services commented on OPENJPA-3007:
----------------------------------------------------------

Commit d1c3c8ca74e893a2a47ff6d9c6fecaa870ef01b8 in openjpa's branch 
refs/heads/OPENJPA-3007 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=d1c3c8ca7 ]

[OPENJPA-3007] Do not let tests depend on rows left by earlier tests or builds

TestInheritedPropertyAccessPersist and TestFieldAccessWithNonStandardAccessors 
insert fixed ids into tables that
nothing clears, and the Derby database outlives the build, so every second run 
in the same target directory
failed: clear their tables when the factory starts. 
TestEntityManagerFactory.emfCreation left an AllFieldTypes
row whose id came from the shared sequence table, which other tests reset, so 
TestInMemoryQueryMatchEscapes could
hit a duplicate key: remove the row, and clear the table in 
TestInMemoryQueryMatchEscapes.
Found with random method and class order (seeds 202, 505, 606, 707).


> Junit6 should be used for tests
> -------------------------------
>
>                 Key: OPENJPA-3007
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-3007
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: build / infrastructure
>    Affects Versions: 4.1.1
>            Reporter: Maxim Solodovnik
>            Assignee: Maxim Solodovnik
>            Priority: Major
>             Fix For: 4.2.0
>
>
>  - Junit6 should be used for tests
>  - various 
> {code}
>     <dependencies>
>         <dependency>
>             <groupId>junit</groupId>
>             <artifactId>junit</artifactId>
>         </dependency>
>     </dependencies>
> {code}
> blocks (added at 0e8b4abfb04d02d9bf9a862b14b8afadc88f3445) should be removed
>  - {{TestEmbeddableCriteria.countTestMethods}} need to be carefully migrated
>  - various {{assertSQL}}, {{assertNotSQL}}, {{assertAllSQL*}}, 
> {{assertSQLFragnments}} need to be unified
>  - Tests like 
> {{openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/conversion/TestConvertedInPlaceChange.java}}
>  {{testElementOfConvertedListRestoredOnRollback}} need to be converted to 
> parametrized



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to