since we no longer have bytebuffer dir, this test is not needed

This commit is contained in:
Shay Banon 2014-03-06 14:52:54 +00:00
parent 4d5870807a
commit 5da883799a
1 changed files with 0 additions and 42 deletions

View File

@ -21,29 +21,21 @@ package org.elasticsearch.index.engine.internal;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;
import org.apache.lucene.util.LuceneTestCase.Slow; import org.apache.lucene.util.LuceneTestCase.Slow;
import org.elasticsearch.action.admin.cluster.node.info.NodeInfo;
import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;
import org.elasticsearch.action.admin.indices.segments.IndexSegments; import org.elasticsearch.action.admin.indices.segments.IndexSegments;
import org.elasticsearch.action.admin.indices.segments.IndexShardSegments; import org.elasticsearch.action.admin.indices.segments.IndexShardSegments;
import org.elasticsearch.action.admin.indices.segments.IndicesSegmentResponse; import org.elasticsearch.action.admin.indices.segments.IndicesSegmentResponse;
import org.elasticsearch.action.admin.indices.segments.ShardSegments; import org.elasticsearch.action.admin.indices.segments.ShardSegments;
import org.elasticsearch.action.admin.indices.stats.IndicesStatsResponse; import org.elasticsearch.action.admin.indices.stats.IndicesStatsResponse;
import org.elasticsearch.common.settings.ImmutableSettings; import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.unit.ByteSizeUnit;
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.util.BloomFilter; import org.elasticsearch.common.util.BloomFilter;
import org.elasticsearch.index.codec.CodecService; import org.elasticsearch.index.codec.CodecService;
import org.elasticsearch.index.engine.Segment; import org.elasticsearch.index.engine.Segment;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.test.ElasticsearchIntegrationTest; import org.elasticsearch.test.ElasticsearchIntegrationTest;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.junit.Test; import org.junit.Test;
import java.util.Collection; import java.util.Collection;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount;
public class InternalEngineIntegrationTest extends ElasticsearchIntegrationTest { public class InternalEngineIntegrationTest extends ElasticsearchIntegrationTest {
@Test @Test
@ -160,38 +152,4 @@ public class InternalEngineIntegrationTest extends ElasticsearchIntegrationTest
assertThat(total, Matchers.equalTo(t)); assertThat(total, Matchers.equalTo(t));
} }
@Test
public void test4093() {
cluster().ensureAtMostNumNodes(1);
assertAcked(prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder()
.put("index.store.type", "memory")
.put("cache.memory.large_cache_size", new ByteSizeValue(1, ByteSizeUnit.MB)) // no need to cache a lot
.put("index.number_of_shards", "1")
.put("index.number_of_replicas", "0")
.put("gateway.type", "none")
.put(InternalEngine.INDEX_COMPOUND_ON_FLUSH, randomBoolean())
.put("index.warmer.enabled", false)
.build()).get());
NodesInfoResponse nodeInfos = client().admin().cluster().prepareNodesInfo().setJvm(true).get();
NodeInfo[] nodes = nodeInfos.getNodes();
for (NodeInfo info : nodes) {
ByteSizeValue directMemoryMax = info.getJvm().getMem().getDirectMemoryMax();
logger.debug(" --> JVM max direct memory for node [{}] is set to [{}]", info.getNode().getName(), directMemoryMax);
}
final int numDocs = between(30, 50); // 30 docs are enough to fail without the fix for #4093
logger.debug(" --> Indexing [{}] documents", numDocs);
for (int i = 0; i < numDocs; i++) {
if ((i + 1) % 10 == 0) {
logger.debug(" --> Indexed [{}] documents", i + 1);
}
client().prepareIndex("test", "type1")
.setSource("a", "" + i)
.setRefresh(true)
.execute()
.actionGet();
}
logger.debug(" --> Done indexing [{}] documents", numDocs);
assertHitCount(client().prepareCount("test").setQuery(QueryBuilders.matchAllQuery()).get(), numDocs);
}
} }