Test Failures on Openvpms-framework

Tim I have started getting some test failures on the framework.   

I havent made any framework changes 

It looks as thought the transaction.delete(adesc) is simply not doing what it is supposed to in the first failure.

I actually dropped back to the 1.8-Dev build  and retested there as well as trunk and I am getting the same failures.  It may well be environment.  I am building against the 1.7 JDK still,  I have included a full test.log - if you can see an evironment setup error let me know.

environment

Windows 7

Java 7

MySQL 5.5.20

Maven 2

I uploaded the full test build log to

https://gist.github.com/Narimm/0ff0df472c44f484fb8d#file-openvpms-framework_test-fail-txt

java.lang.AssertionError: expected:<644> but was:<650>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)
    at org.junit.Assert.assertEquals(Assert.java:118)
    at org.junit.Assert.assertEquals(Assert.java:555)
    at org.junit.Assert.assertEquals(Assert.java:542)
    at org.openvpms.component.business.dao.hibernate.im.archetype.ArchetypeDescriptorDOTestCase.testNestedNodeDescriptors(ArchetypeDescriptorDOTestCase.java:165)

java.lang.AssertionError: expected:<653> but was:<647>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)
    at org.junit.Assert.assertEquals(Assert.java:118)
    at org.junit.Assert.assertEquals(Assert.java:555)
    at org.junit.Assert.assertEquals(Assert.java:542)
    at org.openvpms.component.business.dao.hibernate.im.archetype.ArchetypeDescriptorDOTestCase.testDeleteNodeDescriptor(ArchetypeDescriptorDOTestCase.java:215)

java.lang.AssertionError: expected:<650> but was:<653>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)
    at org.junit.Assert.assertEquals(Assert.java:118)
    at org.junit.Assert.assertEquals(Assert.java:555)
    at org.junit.Assert.assertEquals(Assert.java:542)
    at org.openvpms.component.business.dao.hibernate.im.archetype.ArchetypeDescriptorDOTestCase.testDelete(ArchetypeDescriptorDOTestCase.java:111)

java.lang.AssertionError: expected:<656> but was:<653>
    at org.junit.Assert.fail(Assert.java:88)
    at org.junit.Assert.failNotEquals(Assert.java:743)
    at org.junit.Assert.assertEquals(Assert.java:118)
    at org.junit.Assert.assertEquals(Assert.java:555)
    at org.junit.Assert.assertEquals(Assert.java:542)
    at org.openvpms.component.business.dao.hibernate.im.archetype.ArchetypeDescriptorDOTestCase.testAddAssertionDescriptors(ArchetypeDescriptorDOTestCase.java:197)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Test Failures on Openvpms-framework

I checked out your git repository, and it built fine.

I sometime see errors like this if I run multiple builds against the same database.

-Tim

Re: Test Failures on Openvpms-framework

maybe it would be wise to add drop database and recreate it for test runs to avoid the issue.

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: Test Failures on Openvpms-framework

I mean the tests will fail if run multiple builds are run concurrently.

The database is already dropped pre-test by the hibernate3-maven-plugin.

 

Re: Test Failures on Openvpms-framework

I am pretty sure I am running 1 build process locally at a time.

I am working through possibilities 

Its surefire forking I had the build updated 

to 

<forkCount>1</forkCount>
<reuseForks>false</reuseForks>

This meant each test ran in  a new fork but only 1 at once.  However I think this still may overlap.  Its intermittant depending on how fast or slow the cpu is cycling.

If you run with 

<forkCount>0</forkCount>
<reuseForks>false</reuseForks>

It resolves.

 

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: Test Failures on Openvpms-framework

I keep seeing the //todo's that have been recommending we split integration tests and unit tests into seperate lifecycles 

The unit tests would be fine to fork but these integration tests will mean no forking.

 

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au
Syndicate content