@@ -319,14 +319,17 @@ public void whenSetServerIncludesServerWithoutStateAndNoExistingState_defaultToS
319
319
320
320
@ Test
321
321
public void whenSetServerIncludesServerWithoutStateAndHasExistingState_preserveIt () {
322
- domainStatus .addServer (new ServerStatus ().withClusterName ("1" ).withServerName ("1" ).withState ("state1" ));
323
- domainStatus .addServer (new ServerStatus ().withClusterName ("1" ).withServerName ("2" ).withState ("state1" ));
324
- domainStatus .addServer (new ServerStatus ().withClusterName ("1" ).withServerName ("3" ).withState ("state1" ));
322
+ domainStatus .addServer (new ServerStatus ().withClusterName ("1" ).withServerName ("1" ).withState ("state1" )
323
+ .withHealth (new ServerHealth ().withOverallHealth ("ok" )));
324
+ domainStatus .addServer (new ServerStatus ().withClusterName ("1" ).withServerName ("2" ).withState ("state1" )
325
+ .withHealth (new ServerHealth ().withOverallHealth ("ok" )));
326
+ domainStatus .addServer (new ServerStatus ().withClusterName ("1" ).withServerName ("3" ).withState ("state1" )
327
+ .withHealth (new ServerHealth ().withOverallHealth ("ok" )));
325
328
326
329
domainStatus .setServers (Arrays .asList (
327
- new ServerStatus ().withClusterName ("1" ).withServerName ("1" ).withState ("state1" ),
328
- new ServerStatus ().withClusterName ("1" ).withServerName ("2" ).withState ("state1" ),
329
- new ServerStatus ().withClusterName ("1" ).withServerName ("3" )
330
+ new ServerStatus ().withClusterName ("1" ).withServerName ("1" ).withState ("state1" ),
331
+ new ServerStatus ().withClusterName ("1" ).withServerName ("2" ).withState ("state1" ),
332
+ new ServerStatus ().withClusterName ("1" ).withServerName ("3" )
330
333
));
331
334
332
335
assertThat (getServer ("1" , "3" ).getState (), equalTo ("state1" ));
0 commit comments