Remove unnecessary Thread.sleep calls after alias creation
This commit is contained in:
parent
ae5b963e97
commit
4794345efb
|
@ -114,7 +114,6 @@ public class IndexAliasesTests extends AbstractNodesTests {
|
|||
|
||||
logger.info("--> aliasing index [test] with [alias1]");
|
||||
client1.admin().indices().prepareAliases().addAlias("test", "alias1").execute().actionGet();
|
||||
Thread.sleep(300);
|
||||
|
||||
logger.info("--> indexing against [alias1], should work now");
|
||||
IndexResponse indexResponse = client1.index(indexRequest("alias1").type("type1").id("1").source(source("1", "test"))).actionGet();
|
||||
|
@ -176,7 +175,6 @@ public class IndexAliasesTests extends AbstractNodesTests {
|
|||
logger.info("--> aliasing index [test] with [alias1] and filter [user:kimchy]");
|
||||
FilterBuilder filter = termFilter("user", "kimchy");
|
||||
client1.admin().indices().prepareAliases().addAlias("test", "alias1", filter).execute().actionGet();
|
||||
Thread.sleep(300);
|
||||
|
||||
// For now just making sure that filter was stored with the alias
|
||||
logger.info("--> making sure that filter was stored with alias [alias1] and filter [user:kimchy]");
|
||||
|
@ -205,7 +203,6 @@ public class IndexAliasesTests extends AbstractNodesTests {
|
|||
client1.admin().indices().prepareAliases().addAlias("test", "foos", termFilter("name", "foo")).execute().actionGet();
|
||||
client1.admin().indices().prepareAliases().addAlias("test", "bars", termFilter("name", "bar")).execute().actionGet();
|
||||
client1.admin().indices().prepareAliases().addAlias("test", "tests", termFilter("name", "test")).execute().actionGet();
|
||||
Thread.sleep(300);
|
||||
|
||||
logger.info("--> indexing against [test]");
|
||||
client1.index(indexRequest("test").type("type1").id("1").source(source("1", "foo test")).refresh(true)).actionGet();
|
||||
|
@ -262,7 +259,6 @@ public class IndexAliasesTests extends AbstractNodesTests {
|
|||
client1.admin().indices().prepareAliases().addAlias("test2", "aliasToTest2").execute().actionGet();
|
||||
client1.admin().indices().prepareAliases().addAlias("test2", "aliasToTests").execute().actionGet();
|
||||
client1.admin().indices().prepareAliases().addAlias("test2", "foos", termFilter("name", "foo")).execute().actionGet();
|
||||
Thread.sleep(300);
|
||||
|
||||
logger.info("--> indexing against [test1]");
|
||||
client1.index(indexRequest("test1").type("type1").id("1").source(source("1", "foo test")).refresh(true)).actionGet();
|
||||
|
@ -335,8 +331,6 @@ public class IndexAliasesTests extends AbstractNodesTests {
|
|||
client1.admin().indices().prepareAliases().addAlias("test1", "filter13", termFilter("name", "baz")).execute().actionGet();
|
||||
client1.admin().indices().prepareAliases().addAlias("test3", "filter13", termFilter("name", "baz")).execute().actionGet();
|
||||
|
||||
Thread.sleep(300);
|
||||
|
||||
logger.info("--> indexing against [test1]");
|
||||
client1.index(indexRequest("test1").type("type1").id("11").source(source("11", "foo test1")).refresh(true)).actionGet();
|
||||
client1.index(indexRequest("test1").type("type1").id("12").source(source("12", "bar test1")).refresh(true)).actionGet();
|
||||
|
@ -405,7 +399,6 @@ public class IndexAliasesTests extends AbstractNodesTests {
|
|||
client1.admin().indices().prepareAliases().addAlias("test2", "aliasToTests").execute().actionGet();
|
||||
client1.admin().indices().prepareAliases().addAlias("test2", "foos", termFilter("name", "foo")).execute().actionGet();
|
||||
client1.admin().indices().prepareAliases().addAlias("test2", "tests", termFilter("name", "test")).execute().actionGet();
|
||||
Thread.sleep(300);
|
||||
|
||||
logger.info("--> indexing against [test1]");
|
||||
client1.index(indexRequest("test1").type("type1").id("1").source(source("1", "foo test")).refresh(true)).actionGet();
|
||||
|
|
|
@ -80,7 +80,6 @@ public class AliasResolveRoutingTests extends AbstractNodesTests {
|
|||
client.admin().indices().prepareAliases().addAliasAction(newAddAliasAction("test2", "alias21").routing("1")).execute().actionGet();
|
||||
client.admin().indices().prepareAliases().addAliasAction(newAddAliasAction("test1", "alias0").routing("0")).execute().actionGet();
|
||||
client.admin().indices().prepareAliases().addAliasAction(newAddAliasAction("test2", "alias0").routing("0")).execute().actionGet();
|
||||
Thread.sleep(300);
|
||||
|
||||
assertThat(clusterService.state().metaData().resolveIndexRouting(null, "test1"), nullValue());
|
||||
assertThat(clusterService.state().metaData().resolveIndexRouting(null, "alias"), nullValue());
|
||||
|
@ -124,7 +123,6 @@ public class AliasResolveRoutingTests extends AbstractNodesTests {
|
|||
client.admin().indices().prepareAliases().addAliasAction(newAddAliasAction("test2", "alias21").routing("1")).execute().actionGet();
|
||||
client.admin().indices().prepareAliases().addAliasAction(newAddAliasAction("test1", "alias0").routing("0")).execute().actionGet();
|
||||
client.admin().indices().prepareAliases().addAliasAction(newAddAliasAction("test2", "alias0").routing("0")).execute().actionGet();
|
||||
Thread.sleep(300);
|
||||
|
||||
assertThat(clusterService.state().metaData().resolveSearchRouting(null, "alias"), nullValue());
|
||||
assertThat(clusterService.state().metaData().resolveSearchRouting("0,1", "alias"), equalTo(newMap("test1", newSet("0", "1"))));
|
||||
|
|
|
@ -67,7 +67,6 @@ public class AliasRoutingTests extends AbstractNodesTests {
|
|||
client.admin().cluster().prepareHealth().setWaitForGreenStatus().execute().actionGet();
|
||||
|
||||
client.admin().indices().prepareAliases().addAliasAction(newAddAliasAction("test", "alias0").routing("0")).execute().actionGet();
|
||||
Thread.sleep(300);
|
||||
|
||||
logger.info("--> indexing with id [1], and routing [0] using alias");
|
||||
client.prepareIndex("alias0", "type1", "1").setSource("field", "value1").setRefresh(true).execute().actionGet();
|
||||
|
@ -149,7 +148,6 @@ public class AliasRoutingTests extends AbstractNodesTests {
|
|||
.addAliasAction(newAddAliasAction("test", "alias1").routing("1"))
|
||||
.addAliasAction(newAddAliasAction("test", "alias01").searchRouting("0,1"))
|
||||
.execute().actionGet();
|
||||
Thread.sleep(300);
|
||||
|
||||
|
||||
logger.info("--> indexing with id [1], and routing [0] using alias");
|
||||
|
@ -257,8 +255,6 @@ public class AliasRoutingTests extends AbstractNodesTests {
|
|||
.addAliasAction(newAddAliasAction("test-a", "alias-ab").searchRouting("0"))
|
||||
.addAliasAction(newAddAliasAction("test-b", "alias-ab").searchRouting("1"))
|
||||
.execute().actionGet();
|
||||
Thread.sleep(300);
|
||||
|
||||
|
||||
logger.info("--> indexing with id [1], and routing [0] using alias to test-a");
|
||||
client.prepareIndex("alias-a0", "type1", "1").setSource("field", "value1").setRefresh(true).execute().actionGet();
|
||||
|
@ -364,7 +360,6 @@ public class AliasRoutingTests extends AbstractNodesTests {
|
|||
client.admin().indices().prepareAliases()
|
||||
.addAliasAction(newAddAliasAction("test", "alias").routing("3"))
|
||||
.execute().actionGet();
|
||||
Thread.sleep(300);
|
||||
|
||||
logger.info("--> indexing with id [0], and routing [3]");
|
||||
client.prepareIndex("alias", "type1", "0").setSource("field", "value1").setRefresh(true).execute().actionGet();
|
||||
|
@ -381,7 +376,6 @@ public class AliasRoutingTests extends AbstractNodesTests {
|
|||
client.admin().indices().prepareAliases()
|
||||
.addAliasAction(newAddAliasAction("test", "alias").routing("4"))
|
||||
.execute().actionGet();
|
||||
Thread.sleep(300);
|
||||
|
||||
logger.info("--> verifying search with wrong routing should not find");
|
||||
for (int i = 0; i < 5; i++) {
|
||||
|
@ -393,7 +387,6 @@ public class AliasRoutingTests extends AbstractNodesTests {
|
|||
client.admin().indices().prepareAliases()
|
||||
.addAliasAction(newAddAliasAction("test", "alias").searchRouting("3,4").indexRouting("4"))
|
||||
.execute().actionGet();
|
||||
Thread.sleep(300);
|
||||
|
||||
logger.info("--> indexing with id [1], and routing [4]");
|
||||
client.prepareIndex("alias", "type1", "1").setSource("field", "value2").setRefresh(true).execute().actionGet();
|
||||
|
|
Loading…
Reference in New Issue