Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 953784

Summary: MemberRegistrationTest Arquillian Test fails on jboss-html5-mobile-archetype
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Tolis Emmanouilidis <aemmanou>
Component: ExamplesAssignee: Pete Muir <pmuir>
Status: CLOSED CURRENTRELEASE QA Contact: Tolis Emmanouilidis <aemmanou>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.2.0CC: bsutter, kpiwko, oskutka, pmuir, rruss
Target Milestone: GA   
Target Release: 2.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-14 14:55:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tolis Emmanouilidis 2013-04-19 08:12:44 UTC
Description of problem:

The MemberRegistrationTest Junit test fails. The testRegister and testDuplicateEmail cases are registering a member with the same email. The result is that the testRegister case fails and the test case is considered failed.

Version-Release number of selected component (if applicable):


How reproducible:

On JBDS 6.0.1, create the HTML5 project from the Jboss Central and run the MemberRegistrationTest as JUnit test.

Steps to Reproduce:
1. Create HTML5 project from JBoss Central
2. Deploy on AS
3. Right click on the file and select Run As and then JUnit Test
  
Actual results:
testRegister case failure

Expected results:
Successful execution of JUnit test

Additional info:

Comment 1 JBoss JIRA Server 2013-04-19 08:30:30 UTC
Karel Piwko <kpiwko> made a comment on jira JDF-270

So, should the testRegister email run first and testDuplicateEmail second and assert that it actually fails?

Comment 2 JBoss JIRA Server 2013-04-19 08:37:58 UTC
Tolis Emmanouilidis <aemmanou> made a comment on jira JDF-270

The workaround is to change the member's email address on either the testDuplicateEmail or testRegister case. The reason is that the testDuplicateEmail registers a member and then asserts that the registration with the same email fails. But when the testRegister case is reached, the member with the specified email has already been registered in testDuplicateEmail case.

Comment 3 Tolis Emmanouilidis 2013-04-19 11:22:35 UTC
I'd like to add that the issue appears when the testDuplicateEmail case is executed before the testRegister case. However inside the source file, the testRegister case is defined before the testDuplicateEmail.

I believe that the issue is related to the fact that in JAVA 7 it is not guaranteed that the order of methods returned by reflection is the same as the order declared in the source file. For this reason Junit 11 release notes states that one of the new features is the "Test Execution Order".

Comment 4 JBoss JIRA Server 2013-04-22 08:01:28 UTC
Tolis Emmanouilidis <aemmanou> made a comment on jira JDF-270

https://github.com/jboss-jdf/jboss-as-quickstart/pull/496 PR added

Comment 5 JBoss JIRA Server 2013-04-22 13:46:16 UTC
Rafael Benevides <benevides> updated the status of jira JDF-270 to Resolved

Comment 6 JBoss JIRA Server 2013-04-22 13:46:16 UTC
Rafael Benevides <benevides> made a comment on jira JDF-270

PR Merged

Comment 7 JBoss JIRA Server 2013-04-22 13:48:12 UTC
Tolis Emmanouilidis <aemmanou> made a comment on jira JDF-270

Thank you Rafael :)

Comment 8 JBoss JIRA Server 2013-04-22 13:50:41 UTC
Rafael Benevides <benevides> made a comment on jira JDF-270

You're welcome! Archetypes 7.1.3.CR5 will include this PR :)

Comment 9 Karel Piwko 2013-05-14 14:55:10 UTC
Closed as CURRENTRELEASE, part of WFK 2.2.0 distributables.