[jbpm-issues] [JBoss JIRA] Resolved: (JBPM-2047) PersistenceDbServiceTest and PersistenceServiceDbTest are dependent

Alejandro Guizar (JIRA) jira-events at lists.jboss.org
Thu Jan 14 04:10:31 EST 2010


     [ https://jira.jboss.org/jira/browse/JBPM-2047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alejandro Guizar resolved JBPM-2047.
------------------------------------

    Resolution: Done


The problem no longer occurs as shown in the following maven build. In PersistenceDbServiceTest and all other test cases that use a custom configuration, the JbpmConfiguration instance is explicitly closed on tearDown to avoid affecting other tests.

[aguizar at siankaan core]$ mvn -Dtest=PersistenceDbServiceTest,PersistenceServiceDbTest test
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.jbpm.persistence.db.PersistenceDbServiceTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.758 sec
Running org.jbpm.persistence.db.PersistenceServiceDbTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.262 sec

Results :

Tests run: 16, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------


> PersistenceDbServiceTest and PersistenceServiceDbTest are dependent
> -------------------------------------------------------------------
>
>                 Key: JBPM-2047
>                 URL: https://jira.jboss.org/jira/browse/JBPM-2047
>             Project: jBPM
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Runtime Engine
>    Affects Versions: jBPM-3.2.5.SP1
>            Reporter: Jiri Pechanec
>            Assignee: Alejandro Guizar
>             Fix For: jBPM 3.2.9
>
>
> The tests can fail based on the execution order of these tests.
> If PersistenceDbServiceTest is executed first then it sets session factory to MockSessionFactory.
> Unfortunately it seems that the setting is SAME for ALL future newly created JbpmContexts.
> PersistenceServiceDbTest then tests that the factory is null but it is not assertNull(persistenceServiceFactory.sessionFactory). The same test also tests few more features that ends in calls of unsupported operations on the MockSessionFactory.
> I am not sure if this is a problem of test - then the sessionFactory should be cleard after test or if it is wrong that the setting is shared for all JBpmContexts.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbpm-issues mailing list