Author: navssurtani
Date: 2008-08-11 06:01:56 -0400 (Mon, 11 Aug 2008)
New Revision: 15028
Modified:
search/trunk/src/test/org/hibernate/search/test/id/providedId/ProvidedIdTest.java
Log:
More ProvidedIdTest stuff
Modified:
search/trunk/src/test/org/hibernate/search/test/id/providedId/ProvidedIdTest.java
===================================================================
---
search/trunk/src/test/org/hibernate/search/test/id/providedId/ProvidedIdTest.java 2008-08-11
09:56:37 UTC (rev 15027)
+++
search/trunk/src/test/org/hibernate/search/test/id/providedId/ProvidedIdTest.java 2008-08-11
10:01:56 UTC (rev 15028)
@@ -10,6 +10,8 @@
import org.apache.lucene.queryParser.QueryParser;
import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import java.util.List;
@@ -28,6 +30,7 @@
public void testProvidedId() throws ParseException {
+ final Log log = LogFactory.getLog(JBossCachePerson.class);
person1 = new JBossCachePerson();
person1.setName("Navin Surtani");
person1.setBlurb("Likes playing WoW");
@@ -47,12 +50,17 @@
Session session = openSession();
FullTextSession fullTextSession = Search.getFullTextSession(session);
- Transaction transaction = fullTextSession.beginTransaction();
- session.save(person1);
- session.save(person2);
- session.save(person3);
- session.save(person4);
+ Transaction transaction = session.beginTransaction();
+ session.persist(person1);
+ session.persist(person2);
+ session.persist(person3);
+ session.persist(person4);
+ transaction.commit();
+ session.clear();
+
+ transaction = fullTextSession.beginTransaction();
+
QueryParser parser = new QueryParser("Name", new StandardAnalyzer());
Query luceneQuery = parser.parse("Goat");
@@ -65,6 +73,8 @@
session.close();
System.out.println("result size is " + results.size());
+
+ if(log.isDebugEnabled()) log.warn("result size is " + results.size());
}