Tests: added more logging

This commit is contained in:
Martijn van Groningen 2015-03-06 11:18:05 +01:00
parent 6c79636985
commit 634c91a0ca
1 changed files with 1 additions and 0 deletions

View File

@ -624,6 +624,7 @@ public class DiscoveryWithServiceDisruptionsTests extends ElasticsearchIntegrati
DiscoveryNode previousMaster = event.previousState().nodes().getMasterNode();
DiscoveryNode currentMaster = event.state().nodes().getMasterNode();
if (!Objects.equals(previousMaster, currentMaster)) {
logger.info("node {} received new cluster state: {} \n and had previous cluster state: {}", node, event.state(), event.previousState());
String previousMasterNodeName = previousMaster != null ? previousMaster.name() : null;
String currentMasterNodeName = currentMaster != null ? currentMaster.name() : null;
masters.get(node).add(new Tuple<>(previousMasterNodeName, currentMasterNodeName));