@@ -42,7 +42,7 @@ public class SysClusterHealthTest extends CrateDummyClusterServiceUnitTest {
4242
4343 @ Test
4444 public void test_green_no_tables () {
45- var healths = SysClusterHealth .compute (clusterService .state (), 0 ). join () ;
45+ var healths = SysClusterHealth .compute (clusterService .state (), 0 );
4646 var expected = new SysClusterHealth .ClusterHealth (
4747 TableHealth .Health .GREEN ,
4848 "" ,
@@ -59,7 +59,7 @@ public void test_green_with_tables() throws IOException {
5959 .addTable ("create table doc.t1 (id int) with (number_of_replicas = 0)" );
6060 executor .startShards ("doc.t1" );
6161
62- var healths = SysClusterHealth .compute (clusterService .state (), 0 ). join () ;
62+ var healths = SysClusterHealth .compute (clusterService .state (), 0 );
6363 var expected = new SysClusterHealth .ClusterHealth (
6464 TableHealth .Health .GREEN ,
6565 "" ,
@@ -85,7 +85,7 @@ public void test_cluster_is_yellow() {
8585 var newState = ClusterState .builder (clusterService .state ())
8686 .blocks (ClusterBlocks .builder ().addGlobalBlock (globalBlock ))
8787 .build ();
88- var healths = SysClusterHealth .compute (newState , 0 ). join () ;
88+ var healths = SysClusterHealth .compute (newState , 0 );
8989 var expected = new SysClusterHealth .ClusterHealth (
9090 TableHealth .Health .YELLOW ,
9191 "cannot write metadata" ,
@@ -101,7 +101,7 @@ public void test_tables_are_yellow() throws Exception {
101101 SQLExecutor executor = SQLExecutor .builder (clusterService ).build ()
102102 .addTable ("create table doc.t1 (id int) with (number_of_replicas = 1)" );
103103
104- var healths = SysClusterHealth .compute (clusterService .state (), 0 ). join () ;
104+ var healths = SysClusterHealth .compute (clusterService .state (), 0 );
105105 var expected = new SysClusterHealth .ClusterHealth (
106106 TableHealth .Health .YELLOW ,
107107 "One or more tables are missing shards" ,
@@ -113,7 +113,7 @@ public void test_tables_are_yellow() throws Exception {
113113
114114 executor .startShards ("doc.t1" );
115115
116- healths = SysClusterHealth .compute (clusterService .state (), 0 ). join () ;
116+ healths = SysClusterHealth .compute (clusterService .state (), 0 );
117117 expected = new SysClusterHealth .ClusterHealth (
118118 TableHealth .Health .YELLOW ,
119119 "One or more tables have underreplicated shards" ,
@@ -143,7 +143,7 @@ public void test_cluster_and_tables_are_yellow() throws Exception {
143143 var newState = ClusterState .builder (clusterService .state ())
144144 .blocks (ClusterBlocks .builder ().addGlobalBlock (globalBlock ))
145145 .build ();
146- var healths = SysClusterHealth .compute (newState , 0 ). join () ;
146+ var healths = SysClusterHealth .compute (newState , 0 );
147147 var expected = new SysClusterHealth .ClusterHealth (
148148 TableHealth .Health .YELLOW ,
149149 "Cannot write metadata" , // cluster level message takes precedence
@@ -172,7 +172,7 @@ public void test_cluster_is_red() throws Exception {
172172 var newState = ClusterState .builder (clusterService .state ())
173173 .blocks (ClusterBlocks .builder ().addGlobalBlock (globalBlock ))
174174 .build ();
175- var healths = SysClusterHealth .compute (newState , 0 ). join () ;
175+ var healths = SysClusterHealth .compute (newState , 0 );
176176 var expected = new SysClusterHealth .ClusterHealth (
177177 TableHealth .Health .RED ,
178178 "recovering" , // cluster level message takes precedence
@@ -190,7 +190,7 @@ public void test_tables_are_red() throws Exception {
190190 executor .startShards ("doc.t1" );
191191 executor .failShards ("doc.t1" );
192192
193- var healths = SysClusterHealth .compute (clusterService .state (), 0 ). join () ;
193+ var healths = SysClusterHealth .compute (clusterService .state (), 0 );
194194 var expected = new SysClusterHealth .ClusterHealth (
195195 TableHealth .Health .RED ,
196196 "One or more tables are missing shards" ,
@@ -203,7 +203,7 @@ public void test_tables_are_red() throws Exception {
203203
204204 @ Test
205205 public void test_pending_tasks () throws Exception {
206- var healths = SysClusterHealth .compute (clusterService .state (), 1 ). join () ;
206+ var healths = SysClusterHealth .compute (clusterService .state (), 1 );
207207 assertThat (healths ).containsExactly (new SysClusterHealth .ClusterHealth (
208208 TableHealth .Health .GREEN ,
209209 "" ,
@@ -212,7 +212,7 @@ public void test_pending_tasks() throws Exception {
212212 1
213213 ));
214214
215- healths = SysClusterHealth .compute (clusterService .state (), 0 ). join () ;
215+ healths = SysClusterHealth .compute (clusterService .state (), 0 );
216216 assertThat (healths ).containsExactly (new SysClusterHealth .ClusterHealth (
217217 TableHealth .Health .GREEN ,
218218 "" ,
0 commit comments