[hibernate-dev] Tests failing in HSEARCH trunk

Sanne Grinovero sanne.grinovero at gmail.com
Sat Apr 10 13:31:03 EDT 2010


Hello,
sorry for being short in previous mail, was written from the phone as
I couldn't connect.

The problem is caused by
org.hibernate.search.test.batchindexing.SearchIndexerTest
which was "green" but not properly closing the SessionFactory, and
having used as test model the classes Book, ModernBook and
AncientBook.

The two failing tests are using a different model, by fate there is
also an entity called Book which is almost the same. It likely was
forked by copy-paste, and then adapted for the needs of the other
test.
When I added a new property yesterday to the AncientBook, used by the
not-failing test, the other two tests broke, but they shouldn't be
using this model. In practice hibernate is mapping the correct model,
but the database is still containing the previous schema version.

I've committed a proper cleanup in the wrong test (SearchIndexerTest)
so the tests should be ok now;

I'm wondering why Hudson didn't experience the same issue?
http://hudson.jboss.org/hudson/view/hibernate/job/hibernate-search-trunk/

cheers,
Sanne

2010/4/10 Sanne Grinovero <sanne.grinovero at gmail.com>:
> Yes I saw it too, I have found the test which isn't closing the
> sessionfactory but I'm not committing yet as it seems that I would hide a
> problem. This was caused by a commit of mine adding a property to an entity
> which is not related to those tests, it seems that it's reusing the schema
> as a different entity is having an additional column there while having the
> same table name. Might have found a leak?
> Looking more into it, I'll send an update.
> Sanne
>
> Il giorno 10/apr/2010 13:31, "Gustavo Fernandes" <gustavonalle at gmail.com> ha
> scritto:
>
> Hello, seems like there's a problem of test isolation in the trunk:
>
> $ mvn clean test
>
> Results :
>
> Tests in error:
>  testProjection(org.hibernate.search.test.query.ProjectionQueryTest)
>  testList(org.hibernate.search.test.query.LuceneQueryTest)
>  testResultSize(org.hibernate.search.test.query.LuceneQueryTest)
>  testFirstMax(org.hibernate.search.test.query.LuceneQueryTest)
>  testIterator(org.hibernate.search.test.query.LuceneQueryTest)
>  testScrollableResultSet(org.hibernate.search.test.query.LuceneQueryTest)
>  testMultipleEntityPerIndex(org.hibernate.search.test.query.LuceneQueryTest)
>  testCriteria(org.hibernate.search.test.query.LuceneQueryTest)
>
> Tests run: 206, Failures: 0, Errors: 8, Skipped: 0
>
>
> They fail with the same error:
>
> testList(org.hibernate.search.test.query.LuceneQueryTest)  Time elapsed:
> 0.059 sec  <<< ERROR!
> org.hibernate.exception.DataException: could not insert:
> [org.hibernate.search.test.query.Book]
>        at
> org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:102)
>        at
> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
>        at
> org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2438)
>        at
> org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2858)
>        at
> org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
>        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:268)
>        at
> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:260)
>        at
> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:179)
>        at
> org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
>        at
> org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
>        at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206)
>        at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:375)
>        at
> org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
>        at
> org.hibernate.search.test.query.LuceneQueryTest.testList(LuceneQueryTest.java:60)
> Caused by: java.sql.SQLException: Column count does not match in statement
> [insert into Book (body, mainAuthor_id, publicationDate, summary, id) values
> (?, ?, ?, ?, ?)]
>        at org.hsqldb.jdbc.Util.throwError(Unknown Source)
>        at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
>        at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
>        at
> org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
>        at
> org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:116)
>        at
> org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)
>        at
> org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)
>        at
> org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2395)
>        ... 37 more
>
>
> Running the failing tests individually, it passes:
>
>
> $ mvn -Dtest=ProjectionQueryTest,LuceneQueryTest test
>
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.hibernate.search.test.query.ProjectionQueryTest
> Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.363 sec
> Running org.hibernate.search.test.query.LuceneQueryTest
> Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.373 sec
>
> Results :
>
> Tests run: 24, Failures: 0, Errors: 0, Skipped: 0
>
>
>
> Is anyone else experimenting those problems?
>
>
> Tks,
> Gustavo
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>




More information about the hibernate-dev mailing list