[TEST] Use private store for a test private engine

The test was using the same store as the suite level engine which caused
problems with write locks in some cases.

Closes #8880
This commit is contained in:
Simon Willnauer 2014-12-10 16:44:31 +01:00
parent 624a4b87bf
commit e5a7eaff22
1 changed files with 2 additions and 3 deletions

View File

@ -357,10 +357,8 @@ public class InternalEngineTests extends ElasticsearchLuceneTestCase {
}
public void testStartAndAcquireConcurrently() throws IOException {
// Close engine from setUp (we create our own):
engine.close();
ConcurrentMergeSchedulerProvider mergeSchedulerProvider = new ConcurrentMergeSchedulerProvider(shardId, EMPTY_SETTINGS, threadPool, new IndexSettingsService(shardId.index(), EMPTY_SETTINGS));
final Store store = createStore();
final Engine engine = createEngine(engineSettingsService, store, createTranslog(), mergeSchedulerProvider);
final AtomicBoolean startPending = new AtomicBoolean(true);
Thread thread = new Thread() {
@ -384,6 +382,7 @@ public class InternalEngineTests extends ElasticsearchLuceneTestCase {
}
}
engine.close();
store.close();
}