Hide Forgot
Description of problem: Following instructions from README file I tried to execute remote tests in tasks 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 3. mvn clean test -Parq-jbossas-remote Actual results: ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.jboss.as.quickstarts.tasks.UserDaoTest Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.594 sec Running org.jboss.as.quickstarts.tasks.TaskDaoTest Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.327 sec <<< FAILURE! Results : Failed tests: taskDao_should_provide_basic_case_insensitive_full_text_search(org.jboss.as.quickstarts.tasks.TaskDaoTest): expected:<1> but was:<0> Tests run: 8, Failures: 1, Errors: 0, Skipped: 0 Expected results: test success
Adding the quickstart owners: lfryc and okiss
This is the relavent information from the JBoss server log: 08:52:25,103 INFO [org.jboss.as.server] (management-handler-thread - 3) JBAS018559: Deployed "test.war" (runtime-name : "test.war") 08:52:25,284 WARN [org.hibernate.hql.internal.ast.HqlSqlWalker] (http-/127.0.0.1:8080-2) [DEPRECATION] Encountered positional parameter near line 1, column 69. Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead. 08:52:25,430 WARN [org.hibernate.hql.internal.ast.HqlSqlWalker] (http-/127.0.0.1:8080-2) [DEPRECATION] Encountered positional parameter near line 1, column 69. Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead. 08:52:25,432 WARN [org.hibernate.hql.internal.ast.HqlSqlWalker] (http-/127.0.0.1:8080-2) [DEPRECATION] Encountered positional parameter near line 1, column 95. Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead. 08:52:25,528 INFO [org.jboss.web] (ServerService Thread Pool -- 49) JBAS018224: Unregister web context: /test 08:52:25,544 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016009: Stopping weld service for deployment test.war 08:52:25,547 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 55) JBAS011403: Stopping Persistence Unit Service 'test.war#primary' 08:52:25,548 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 55) HHH000227: Running hbm2ddl schema export 08:52:25,551 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 55) HHH000230: Schema export complete 08:52:25,559 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010409: Unbound data source [java:jboss/datasources/TasksQuickstartTestDS] 08:52:25,565 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment test.war (runtime-name: test.war) in 43ms Note the [DEPRECATION] messages in the logs.
This is from the surefire report: ------------------------------------------------------------------------------- Test set: org.jboss.as.quickstarts.tasks.TaskDaoTest ------------------------------------------------------------------------------- Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.688 sec <<< FAILURE! taskDao_should_provide_basic_case_insensitive_full_text_search(org.jboss.as.quickstarts.tasks.TaskDaoTest) Time elapsed: 0.076 sec <<< FAILURE! java.lang.AssertionError: expected:<1> but was:<0> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:743) at org.junit.Assert.assertEquals(Assert.java:118) at org.junit.Assert.assertEquals(Assert.java:555) at org.junit.Assert.assertEquals(Assert.java:542) at org.jboss.as.quickstarts.tasks.TaskDaoTest.taskDao_should_provide_basic_case_insensitive_full_text_search(TaskDaoTest.java:109) It looks like this test is failing: @Test public void taskDao_should_provide_basic_case_insensitive_full_text_search() { // given String taskTitlePart = "FIRST"; // when List<Task> titledTasks = taskDao.getForTitle(detachedUser, taskTitlePart); // then assertEquals(1, titledTasks.size()); <--line 109: This assertion fails assertTrue(titledTasks.get(0).getTitle().contains("first")); }
I missed something earlier in the tests: 08:52:24,821 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 51) HHH000227: Running hbm2ddl schema export 08:52:24,822 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 51) HHH000389: Unsuccessful: alter table Task drop constraint FK_kxfu633bvt1sptgbnkxkrr3qf 08:52:24,823 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 51) Table "TASK" not found; SQL statement: alter table Task drop constraint FK_kxfu633bvt1sptgbnkxkrr3qf [42102-168] 08:52:24,831 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 51) HHH000230: Schema export complete
*** Bug 1016315 has been marked as a duplicate of this bug. ***
VineetReynolds issued the fix in this commit: https://github.com/jboss-developer/jboss-eap-quickstarts/commit/f49e1f3fa7ec34f736c5be32f6a04e7200c0f96d
Verified on EAP 6.2.0 ER5.1
*** Bug 977768 has been marked as a duplicate of this bug. ***