Bug 1015949 - Test failures in 'tasks-jsf' quickstarts example
Test failures in 'tasks-jsf' quickstarts example
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Quickstarts (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ER5
: EAP 6.2.0
Assigned To: sgilda
Vladimir Rastseluev
Depends On:
  Show dependency treegraph
Reported: 2013-10-07 01:56 EDT by Vladimir Rastseluev
Modified: 2017-10-09 20:11 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-12-15 11:18:51 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Surefire report (67.60 KB, text/plain)
2013-10-07 19:40 EDT, sgilda
no flags Details

  None (edit)
Description Vladimir Rastseluev 2013-10-07 01:56:21 EDT
Description of problem:
Following instructions from README file I tried to execute remote tests in tasks-jsf quicktsarts example. There are test failures.

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

How reproducible:

Steps to Reproduce:
1. start standalone server 
2. cd $QUICKSTARTS_ROOT/tasks-jsf
3. mvn clean test -Parq-jbossas-remote 

Actual results:
 T E S T S
Running org.jboss.as.quickstarts.tasksJsf.ResourcesTest
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.073 sec <<< FAILURE!
Running org.jboss.as.quickstarts.tasksJsf.TaskListBeanTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.178 sec
Running org.jboss.as.quickstarts.tasksJsf.UserDaoTest
Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 1.456 sec <<< FAILURE!
Running org.jboss.as.quickstarts.tasksJsf.TaskDaoTest
Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 1.357 sec <<< FAILURE!

Results :

Failed tests:   facesContext_should_be_provided_from_current_context(org.jboss.as.quickstarts.tasksJsf.ResourcesTest)

Tests in error: 
  user_should_be_retrievable_from_userDao_by_username(org.jboss.as.quickstarts.tasksJsf.UserDaoTest): java.lang.IllegalStateException: EntityManager is closed
  userDao_should_return_null_when_searching_for_non_existent_user(org.jboss.as.quickstarts.tasksJsf.UserDaoTest): java.lang.IllegalStateException: EntityManager is closed
  userDao_should_create_user_so_it_could_be_retrieved_from_userDao_by_username(org.jboss.as.quickstarts.tasksJsf.UserDaoTest): java.lang.IllegalStateException: EntityManager is closed
  all_tasks_should_be_obtained_from_detachedUser(org.jboss.as.quickstarts.tasksJsf.TaskDaoTest): java.lang.IllegalStateException: EntityManager is closed
  range_of_tasks_should_be_provided_by_taskDao(org.jboss.as.quickstarts.tasksJsf.TaskDaoTest): java.lang.IllegalStateException: EntityManager is closed
  taskDao_should_remove_task_from_detachedUser(org.jboss.as.quickstarts.tasksJsf.TaskDaoTest): java.lang.IllegalStateException: EntityManager is closed
  taskDao_should_provide_basic_case_insensitive_full_text_search(org.jboss.as.quickstarts.tasksJsf.TaskDaoTest): java.lang.IllegalStateException: EntityManager is closed
  user_should_be_created_with_one_task_attached(org.jboss.as.quickstarts.tasksJsf.TaskDaoTest): EntityManager is closed

Tests run: 12, Failures: 1, Errors: 8, Skipped: 0

Expected results:
test success
Comment 1 sgilda 2013-10-07 09:27:24 EDT
Adding quickstart owners to the bug:

lfryc@redhat.com, okiss@redhat.com
Comment 2 sgilda 2013-10-07 19:08:07 EDT
I suspect this is the same issue as https://bugzilla.redhat.com/show_bug.cgi?id=1015948 but am not certain.
Comment 3 sgilda 2013-10-07 19:39:23 EDT
I see this in the server log:

19:31:02,281 INFO  [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 48) HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
19:31:02,282 WARN  [org.hibernate.dialect.H2Dialect] (ServerService Thread Pool -- 48) HHH000431: Unable to determine H2 database version, certain features may not work
19:31:02,292 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (ServerService Thread Pool -- 48) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory
19:31:02,293 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (ServerService Thread Pool -- 48) HHH000397: Using ASTQueryTranslatorFactory
19:31:02,323 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 48) HHH000227: Running hbm2ddl schema export
19:31:02,325 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 48) HHH000389: Unsuccessful: alter table Task drop constraint FK_kxfu633bvt1sptgbnkxkrr3qf
19:31:02,325 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 48) Table "TASK" not found; SQL statement:
alter table Task drop constraint FK_kxfu633bvt1sptgbnkxkrr3qf [42102-168]
19:31:02,333 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 48) HHH000230: Schema export complete
Comment 4 sgilda 2013-10-07 19:40:49 EDT
Created attachment 809027 [details]
Surefire report
Comment 5 sgilda 2013-10-08 12:04:55 EDT
VineetReynolds issued the fix in this commit: 
Comment 6 Vladimir Rastseluev 2013-10-10 05:11:13 EDT
Verified on EAP 6.2.0 ER5.1

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