Bug 1015949 - Test failures in 'tasks-jsf' quickstarts example
Summary: Test failures in 'tasks-jsf' quickstarts example
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Quickstarts
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER5
: EAP 6.2.0
Assignee: sgilda
QA Contact: Vladimir Rastseluev
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-07 05:56 UTC by Vladimir Rastseluev
Modified: 2017-10-10 00:11 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-12-15 16:18:51 UTC
Type: Bug
Embargoed:


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

Description Vladimir Rastseluev 2013-10-07 05:56:21 UTC
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:
easy

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 13:27:24 UTC
Adding quickstart owners to the bug:

lfryc, okiss

Comment 2 sgilda 2013-10-07 23:08:07 UTC
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 23:39:23 UTC
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 23:40:49 UTC
Created attachment 809027 [details]
Surefire report

Comment 5 sgilda 2013-10-08 16:04:55 UTC
VineetReynolds issued the fix in this commit: 
https://github.com/jboss-developer/jboss-eap-quickstarts/commit/f49e1f3fa7ec34f736c5be32f6a04e7200c0f96d

Comment 6 Vladimir Rastseluev 2013-10-10 09:11:13 UTC
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.