Bug 1091114 - MOP unit tests are order dependent
Summary: MOP unit tests are order dependent
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: Portal
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ER03
: 6.2.0
Assignee: Peter Palaga
QA Contact: vramik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-24 22:43 UTC by vramik
Modified: 2025-02-10 03:35 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 03:35:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker GTNMOP-54 0 Major Open Tests in WorkspaceTestCase are order dependent 2015-08-07 13:50:08 UTC

Description vramik 2014-04-24 22:43:16 UTC
Description of problem:
Community MOP Core project (https://github.com/gatein/gatein-mop/tree/1.3.1.Final/core) has test dependency junit-4.10.jar (managed from gatein-dep-1.4.0.Final). 

Prod MOP Core (http://git.app.eng.bos.redhat.com/git/gatein/gatein-mop.git/tree/core?id=1.3.1.Final-redhat-1) has test dependency junit-4.11-redhat-1.jar. 

There are junit 4.11 release notes: https://github.com/junit-team/junit/blob/master/doc/ReleaseNotes4.11.md#test-execution-order

Test execution order has changed between junit 4.10 and 4.11. I get test failures in org.gatein.mop.core.api.workspace.WorkspaceTestCase. It depends on order of execution of org.gatein.mop.core.api.workspace.WorkspaceTestCase.testRemoveReferencedTemplate. When the test is runned, all following tests, where a site "portal" is added (.addSite(ObjectType.PORTAL_SITE, "portal")), fails. In junit 4.10 the test is runned in the end of the test file so the tests passed but in 4.11 5 tests fails with ERROR org.chromattic.core.DomainSession - Attempt to insert context EntityContext[state=ObjectStatus[status=TRANSIENT],mapper=EntityMapper[class=class org.gatein.mop.core.api.workspace.PortalSite,typeName=mop:portalsite]] as an existing child with name mop:portal child of node /mop:workspace/mop:portalsites

Version-Release number of selected component (if applicable):
community MOP: 1.3.1.Final with junit 4.10
prod MOP: 1.3.1.Final-redhat-1 with junit 4.11-redhat-1

Additional info:
When I declare junit version to 4.11 in community project I get the errors.
When I declare junit version to 4.10-redhat-2 in prod project all tests passed.

Comment 2 Boleslaw Dawidowicz 2014-04-28 06:43:46 UTC
This is minor and very lowest priority.

Comment 3 Peter Palaga 2014-05-27 15:30:45 UTC
PR sent to upstream https://github.com/gatein/gatein-mop/pull/2

Comment 4 Peter Palaga 2014-06-02 21:02:48 UTC
https://github.com/gatein/gatein-mop/pull/2 was merged in upstream and will reach JBoss Portal 6.2.0.ER3

Comment 5 vramik 2014-06-11 10:23:03 UTC
Verified in JP6.2.ER03, MOP version (1.3.3.Final-redhat-1)

https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EPP/view/EPP/view/6.2/view/Unit%20testing/job/epp6_unit_tests_module_mop/35/

Comment 6 Jared MORGAN 2014-07-02 02:10:46 UTC
Seems internal junit testing bug. No CCFR Required.

Comment 8 Red Hat Bugzilla 2025-02-10 03:35:41 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


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