Skip to content

Commit

Permalink
Tests cleanup: duplicate and unused properties in test configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanne committed Jul 23, 2013
1 parent aeba85d commit fe64857
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
Expand Up @@ -23,14 +23,12 @@
*/
package org.hibernate.search.test.worker;

import org.apache.lucene.analysis.StopAnalyzer;
import org.jboss.byteman.contrib.bmunit.BMRule;
import org.jboss.byteman.contrib.bmunit.BMUnitRunner;
import org.junit.Test;
import org.junit.runner.RunWith;

import org.hibernate.cfg.Configuration;
import org.hibernate.search.Environment;

/**
* @author Emmanuel Bernard
Expand All @@ -51,8 +49,6 @@ public void testConcurrency() throws Exception {
@Override
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( "hibernate.search.default.directory_provider", "ram" );
cfg.setProperty( Environment.ANALYZER_CLASS, StopAnalyzer.class.getName() );
cfg.setProperty( "hibernate.search.worker.scope", "transaction" );
cfg.setProperty( "hibernate.search.default.worker.execution", "async" );
cfg.setProperty( "hibernate.search.default.worker.thread_pool.size", "1" );
Expand Down
Expand Up @@ -25,7 +25,6 @@

import org.hibernate.cfg.Configuration;
import org.hibernate.search.Environment;
import org.apache.lucene.analysis.StopAnalyzer;

/**
* @author Emmanuel Bernard
Expand All @@ -34,9 +33,7 @@ public class SyncWorkerTest extends WorkerTestCase {

protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( "hibernate.search.default.directory_provider", "ram" );
cfg.setProperty( Environment.ANALYZER_CLASS, StopAnalyzer.class.getName() );
cfg.setProperty( Environment.WORKER_SCOPE, "transaction" );
cfg.setProperty( Environment.WORKER_PREFIX, "sync" );
cfg.setProperty( "hibernate.search.default.worker.execution", "sync" );
}
}
Expand Up @@ -23,7 +23,6 @@
*/
package org.hibernate.search.test.worker;

import java.io.File;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -217,9 +216,7 @@ public void run() {

protected void configure(org.hibernate.cfg.Configuration cfg) {
super.configure( cfg );
File sub = getBaseIndexDir();
cfg.setProperty( "hibernate.search.default.indexBase", sub.getAbsolutePath() );
cfg.setProperty( "hibernate.search.Clock.directory_provider", "filesystem" );
cfg.setProperty( "hibernate.search.default.directory_provider", "ram" );
cfg.setProperty( Environment.ANALYZER_CLASS, StopAnalyzer.class.getName() );
cfg.setProperty( "hibernate.show_sql", "false" );
cfg.setProperty( "hibernate.format_sql", "false" );
Expand Down

0 comments on commit fe64857

Please sign in to comment.