@@ -86,18 +86,18 @@ public void testHealth() {
8686 logger .info ("--> running cluster health on an index that does not exists" );
8787 IndexNotFoundException exception = expectThrows (
8888 IndexNotFoundException .class ,
89- () -> client ().admin ()
90- .cluster ()
91- .prepareHealth ("test1" )
92- .setWaitForYellowStatus ()
93- .setTimeout ("1s" )
94- .execute ()
95- .actionGet ()
89+ () -> client ().admin ().cluster ().prepareHealth ("test1" ).setWaitForYellowStatus ().setTimeout ("1s" ).execute ().actionGet ()
9690 );
9791 assertThat (exception .getMessage (), equalTo ("no such index [test1]" ));
9892
9993 logger .info ("--> running cluster wide health" );
100- ClusterHealthResponse healthResponse = client ().admin ().cluster ().prepareHealth ().setWaitForGreenStatus ().setTimeout ("10s" ).execute ().actionGet ();
94+ ClusterHealthResponse healthResponse = client ().admin ()
95+ .cluster ()
96+ .prepareHealth ()
97+ .setWaitForGreenStatus ()
98+ .setTimeout ("10s" )
99+ .execute ()
100+ .actionGet ();
101101 assertThat (healthResponse .isTimedOut (), equalTo (false ));
102102 assertThat (healthResponse .getStatus (), equalTo (ClusterHealthStatus .GREEN ));
103103 assertThat (healthResponse .getIndices ().isEmpty (), equalTo (true ));
@@ -114,13 +114,7 @@ public void testHealth() {
114114 logger .info ("--> running cluster health on an index that does exists and an index that doesn't exists" );
115115 IndexNotFoundException exception2 = expectThrows (
116116 IndexNotFoundException .class ,
117- () -> client ().admin ()
118- .cluster ()
119- .prepareHealth ("test1" , "test2" )
120- .setWaitForYellowStatus ()
121- .setTimeout ("1s" )
122- .execute ()
123- .actionGet ()
117+ () -> client ().admin ().cluster ().prepareHealth ("test1" , "test2" ).setWaitForYellowStatus ().setTimeout ("1s" ).execute ().actionGet ()
124118 );
125119 assertThat (exception2 .getMessage (), equalTo ("no such index [test2]" ));
126120 }
0 commit comments