Bug 779707 (SOA-2071) - jBPM test cases fails when JtaDbPersistenceServiceFactory is used
Summary: jBPM test cases fails when JtaDbPersistenceServiceFactory is used
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-2071
Product: JBoss Enterprise SOA Platform 4
Classification: JBoss
Component: JBPM - within SOA
Version: 4.3 CP04 ER1
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: ---
Assignee: Alejandro Guizar
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-05 12:11 UTC by Jiri Pechanec
Modified: 2010-05-28 01:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-28 01:15:22 UTC
Type: Bug


Attachments (Terms of Use)
jbpm2489.tar.gz (100.12 KB, application/x-gzip)
2010-05-06 10:02 UTC, Jiri Pechanec
no flags Details
config_repository.patch (7.37 KB, text/plain)
2010-05-07 07:09 UTC, Alejandro Guizar
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-2071 0 None None None Never

Description Jiri Pechanec 2010-05-05 12:11:07 UTC
Date of First Response: 2010-05-05 09:19:46
project_key: SOA

jBPM test suite is configured to use following configuration in jbpm.cfg.xml
    <service name="persistence">
      <factory>
        <bean class="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory">
          <property name="isTransactionEnabled"><false/></property>
          <property name="isCurrentSessionEnabled"><true/></property>
          <!--property name="sessionFactoryJndiName">
            <string value="java:/myHibSessFactJndiName" />
          </property-->
        </bean>
     </factory>
     </service>

and hibernate.cfg.xml
<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="hibernate.connection.datasource">JbpmDS</property>

The datasource is provided by SOA-P

With this configuration many test cases that uses job executor are failing - en example is
http://hudson.qa.jboss.com/hudson/view/SOA-Release/job/soa-jbpm-single-maven/94/testReport/

Testsuite runs OK if persistence is set to  <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />

It seems that process hangs in join, has problems with concurrent access etc.

Comment 1 Jiri Pechanec 2010-05-05 12:13:08 UTC
Revision under test
JBPM branch 	3.2.9 jbpm-3.2-soa 	Revision 6281

Comment 3 Alejandro Guizar 2010-05-05 23:04:33 UTC
Please try the following configuration and tell me how it goes: <service name="persistence" factory="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory" /> 

If I recall correctly, tests that invoke java.sql.DatabaseMetaData.getTables have always failed due to the data source being accessed remotely. The affected tests (shown below) should be excluded from the test suite.

* JbpmSchemaDbTest.testCreateSchema
* JbpmSchemaDbTest.testDropSchema
* JbpmSchemaDbTest.testCleanSchema
* JoinDbTest.testParentLockMode

I'll work on the other failing tests.

Comment 4 Jiri Pechanec 2010-05-06 10:02:10 UTC
I am attaching a file that contains jBPM and hibernate configs and test log for JBPM2489Test executed on plain setup and against SOA-P - please look at differences

Comment 5 Jiri Pechanec 2010-05-06 10:02:10 UTC
Attachment: Added: jbpm2489.tar.gz


Comment 6 Alejandro Guizar 2010-05-07 06:15:45 UTC
I got some good progress here.

SerializabilityTest fails because the test assumed the jBPM classes under test are unpacked. This has been addressed as of revision 6301.

Concurrency test failures are all related to JBPM-2767. The jbpm configuration being used in the soa platform is missing property "retries" in bean "jbpm.job.executor". Changing testsuite.xslt to set the missing property to 3 allows concurrency tests to complete successfully.

I have the following suggestions:
* custom configuration files add to and replace settings in org/jbpm/default.jbpm.cfg.xml. The jbpm.cfg.xml file distributed in jbpm.esb should be trimmed to contain only those settings that differ from the defaults. This allows for future additions or changes in the default settings to not affect the platform.
* apply the attached patch

Comment 7 Alejandro Guizar 2010-05-07 06:55:45 UTC
Attaching patch for https://svn.devel.redhat.com/repos/jboss-qa/hudson/config_repository

Change log:
* avoids format loss when transforming configuration xml files
* prevents insertion of the unnecessary and costly hibernate.hbm2ddl.auto property
* adds retries property to jbpm.job.executor bean
* removes obsolete test exclusions
* takes out parent directory during soa distro extraction

Comment 8 Alejandro Guizar 2010-05-07 06:55:45 UTC
Attachment: Added: config_repository.patch


Comment 9 Alejandro Guizar 2010-05-07 07:00:57 UTC
Attachment: Removed: config_repository.patch 


Comment 10 Alejandro Guizar 2010-05-07 07:09:39 UTC
Attachment: Added: config_repository.patch


Comment 11 Alejandro Guizar 2010-05-07 08:58:27 UTC
Now we have much nicer test results: http://hudson.qa.jboss.com/hudson/view/SOA-Release/job/soa-jbpm-single-maven/96/

* PersistenceServiceFactoryDbTest needs to be excluded again
* SerializabilityTest can be fixed by updating to r6301 of branch jbpm-3.2-soa (see previous comments)
* JbpmSchemaDbTest and JoinDbTest fail with MySQL but appear to work fine with PostgreSQL. Must be an issue with the MySQL driver.

Comment 12 Jiri Pechanec 2010-05-07 12:08:13 UTC
http://hudson.qa.jboss.com/hudson/view/SOA-Release/job/soa-jbpm-os-jdk16-maven/40/
http://hudson.qa.jboss.com/hudson/view/SOA-Release/job/soa-jbpm-db-jdk16-maven/80/

Based on this test results I suggest to resolve and close the issue

Thanks Alejandro

Comment 13 Jiri Pechanec 2010-05-07 12:12:59 UTC
Resolved by accident

Comment 14 Alejandro Guizar 2010-05-28 01:15:17 UTC
Marking as resolved now that the underlying problem has been pinpointed.


Note You need to log in before you can comment on or make changes to this bug.