Skip to content

Commit

Permalink
HSEARCH-1354 Fixing wrong import in OptimizerPerformanceTest and maki…
Browse files Browse the repository at this point in the history
…ng sure that super#setup() is called in setup() of ReaderPerformance
  • Loading branch information
hferentschik committed Aug 1, 2013
1 parent 06472f1 commit acdc333
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Expand Up @@ -32,24 +32,25 @@
import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.queryParser.QueryParser;
import org.apache.lucene.search.Query;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;

import org.hibernate.search.Environment;
import org.hibernate.search.FullTextSession;
import org.hibernate.search.impl.FullTextSessionImpl;
import org.hibernate.search.test.SearchTestCase;
import org.hibernate.search.test.SearchTestCaseJUnit4;
import org.hibernate.search.test.TestConstants;
import org.hibernate.search.util.impl.FileHelper;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
* @author Emmanuel Bernard
*/
public class OptimizerPerformanceTest extends SearchTestCaseJunit4 {
public class OptimizerPerformanceTest extends SearchTestCaseJUnit4 {
@Before
public void setUp() throws Exception {
forceConfigurationRebuild();
Expand Down Expand Up @@ -131,8 +132,10 @@ public void run() {
s = sf.openSession();
tx = s.beginTransaction();
FullTextSession fts = new FullTextSessionImpl( s );
QueryParser parser = new QueryParser( TestConstants.getTargetLuceneVersion(),
"id", TestConstants.stopAnalyzer );
QueryParser parser = new QueryParser(
TestConstants.getTargetLuceneVersion(),
"id", TestConstants.stopAnalyzer
);
Query query;
try {
query = parser.parse( "name:Gavin" );
Expand Down
Expand Up @@ -58,13 +58,13 @@ public abstract class ReaderPerformance extends SearchTestCase {
private static final int WARM_UP_CYCLES = 6;

public void setUp() throws Exception {
super.setUp();
File baseIndexDir = getBaseIndexDir();
baseIndexDir.mkdirs();
File[] files = baseIndexDir.listFiles();
for ( File file : files ) {
FileHelper.delete( file );
}
super.setUp();
}

public void tearDown() throws Exception {
Expand Down

0 comments on commit acdc333

Please sign in to comment.