Skip to content

Commit

Permalink
remove unnecessary mondifications to ITs
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxpi committed Mar 25, 2023
1 parent d0ae3d8 commit 0c908db
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ public void testStrictWeightedRoutingWithCustomString() {

SearchResponse searchResponse = internalCluster().client(nodeMap.get("b").get(0))
.prepareSearch()
.setSize(70)
.setSize(20)
.setPreference(customPreference)
.get();
assertEquals(RestStatus.OK.getStatus(), searchResponse.status().getStatus());
Expand All @@ -1130,9 +1130,9 @@ public void testStrictWeightedRoutingWithCustomString() {
.get();

// make search requests with custom string
searchResponse = internalCluster().client(nodeMap.get("c").get(0))
.prepareSearch("test")
.setSize(70)
internalCluster().client(nodeMap.get("a").get(0))
.prepareSearch()
.setSize(20)
.setPreference(customPreference)
.setQuery(QueryBuilders.matchAllQuery())
.get();
Expand Down Expand Up @@ -1185,8 +1185,7 @@ public void testPreferenceSearchWithWeightedRouting() {
assertEquals(RestStatus.OK.getStatus(), searchResponse.status().getStatus());

searchResponse = internalCluster().client(nodeMap.get("a").get(0))
.prepareSearch("test")
.setQuery(QueryBuilders.matchAllQuery())
.prepareSearch()
.setPreference(
"_only_nodes:" + nodeIDMap.get(nodeInZoneA) + "," + nodeIDMap.get(nodeInZoneB) + "," + nodeIDMap.get(nodeInZoneC)
)
Expand All @@ -1198,7 +1197,6 @@ public void testPreferenceSearchWithWeightedRouting() {
* Assert that preference based search with preference type is not allowed with strict weighted shard routing
*/
public void testStrictWeightedRouting() {

Settings commonSettings = Settings.builder()
.put("cluster.routing.allocation.awareness.attributes", "zone")
.put("cluster.routing.allocation.awareness.force.zone.values", "a,b,c")
Expand Down

0 comments on commit 0c908db

Please sign in to comment.