Skip to content

Commit fe64857

Browse files
committed
Tests cleanup: duplicate and unused properties in test configuration
1 parent aeba85d commit fe64857

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

orm/src/test/java/org/hibernate/search/test/worker/AsyncWorkerTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@
2323
*/
2424
package org.hibernate.search.test.worker;
2525

26-
import org.apache.lucene.analysis.StopAnalyzer;
2726
import org.jboss.byteman.contrib.bmunit.BMRule;
2827
import org.jboss.byteman.contrib.bmunit.BMUnitRunner;
2928
import org.junit.Test;
3029
import org.junit.runner.RunWith;
3130

3231
import org.hibernate.cfg.Configuration;
33-
import org.hibernate.search.Environment;
3432

3533
/**
3634
* @author Emmanuel Bernard
@@ -51,8 +49,6 @@ public void testConcurrency() throws Exception {
5149
@Override
5250
protected void configure(Configuration cfg) {
5351
super.configure( cfg );
54-
cfg.setProperty( "hibernate.search.default.directory_provider", "ram" );
55-
cfg.setProperty( Environment.ANALYZER_CLASS, StopAnalyzer.class.getName() );
5652
cfg.setProperty( "hibernate.search.worker.scope", "transaction" );
5753
cfg.setProperty( "hibernate.search.default.worker.execution", "async" );
5854
cfg.setProperty( "hibernate.search.default.worker.thread_pool.size", "1" );

orm/src/test/java/org/hibernate/search/test/worker/SyncWorkerTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
import org.hibernate.cfg.Configuration;
2727
import org.hibernate.search.Environment;
28-
import org.apache.lucene.analysis.StopAnalyzer;
2928

3029
/**
3130
* @author Emmanuel Bernard
@@ -34,9 +33,7 @@ public class SyncWorkerTest extends WorkerTestCase {
3433

3534
protected void configure(Configuration cfg) {
3635
super.configure( cfg );
37-
cfg.setProperty( "hibernate.search.default.directory_provider", "ram" );
38-
cfg.setProperty( Environment.ANALYZER_CLASS, StopAnalyzer.class.getName() );
3936
cfg.setProperty( Environment.WORKER_SCOPE, "transaction" );
40-
cfg.setProperty( Environment.WORKER_PREFIX, "sync" );
37+
cfg.setProperty( "hibernate.search.default.worker.execution", "sync" );
4138
}
4239
}

orm/src/test/java/org/hibernate/search/test/worker/WorkerTestCase.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
*/
2424
package org.hibernate.search.test.worker;
2525

26-
import java.io.File;
2726
import java.util.concurrent.ExecutorService;
2827
import java.util.concurrent.Executors;
2928
import java.util.concurrent.TimeUnit;
@@ -217,9 +216,7 @@ public void run() {
217216

218217
protected void configure(org.hibernate.cfg.Configuration cfg) {
219218
super.configure( cfg );
220-
File sub = getBaseIndexDir();
221-
cfg.setProperty( "hibernate.search.default.indexBase", sub.getAbsolutePath() );
222-
cfg.setProperty( "hibernate.search.Clock.directory_provider", "filesystem" );
219+
cfg.setProperty( "hibernate.search.default.directory_provider", "ram" );
223220
cfg.setProperty( Environment.ANALYZER_CLASS, StopAnalyzer.class.getName() );
224221
cfg.setProperty( "hibernate.show_sql", "false" );
225222
cfg.setProperty( "hibernate.format_sql", "false" );

0 commit comments

Comments
 (0)