Skip to content

Commit

Permalink
Increasing number of shards in test #21
Browse files Browse the repository at this point in the history
  • Loading branch information
renekrie committed Aug 30, 2022
1 parent 898dd06 commit 6e6ade7
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.support.WriteRequest;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.Request;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.transport.RemoteTransportException;
import querqy.elasticsearch.query.MatchingQuery;
import querqy.elasticsearch.query.QuerqyQueryBuilder;
import querqy.elasticsearch.query.Rewriter;
Expand All @@ -35,7 +33,7 @@
@ESIntegTestCase.ClusterScope(scope = SUITE, supportsDedicatedMasters = false, numClientNodes = 1, numDataNodes = 2)
public class RewriterShardContextsTest extends ESIntegTestCase {

private static final int NUM_DOT_QUERY_REPLICAS = 1;
private static final int NUM_DOT_QUERQY_REPLICAS = 1;


@Override
Expand All @@ -47,7 +45,7 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
protected Settings nodeSettings(final int nodeOrdinal, final Settings otherSettings) {

return Settings.builder().put(super.nodeSettings(nodeOrdinal, otherSettings))
.put(SETTINGS_QUERQY_INDEX_NUM_REPLICAS, NUM_DOT_QUERY_REPLICAS)
.put(SETTINGS_QUERQY_INDEX_NUM_REPLICAS, NUM_DOT_QUERQY_REPLICAS)
.build();
}

Expand Down Expand Up @@ -142,7 +140,7 @@ public void index() {
final String indexName = "idx";
client().admin().indices().prepareCreate(indexName).setSettings(Settings.builder()
.put("index.shard.check_on_startup", false)
.put("index.number_of_shards", 1)
.put("index.number_of_shards", 2)
.put("index.number_of_replicas", 1)).get();
client().prepareIndex(indexName)
.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE)
Expand Down

0 comments on commit 6e6ade7

Please sign in to comment.