@Test public void returnTrue_IfNexusHAIsFalseAndFormatHAIsFalse() { when(nodeAccess.isClustered()).thenReturn(false); highAvailabilitySupportChecker = new HighAvailabilitySupportChecker(nodeAccess); System.setProperty(HA_SUPPORTED_PROPERTY, "false"); assertThat(highAvailabilitySupportChecker.isSupported(FORMAT_NAME), is(true)); }
public boolean isSupported(final String formatName) { boolean formatForcedEnabled = formatHAStates.computeIfAbsent(formatName, f -> getBoolean(format("nexus.%s.ha.supported", formatName), false)); return !isNexusClustered || formatForcedEnabled; }
HighAvailabilitySupportChecker { public boolean isSupported(final String formatName) { boolean formatForcedEnabled = formatHAStates.computeIfAbsent(formatName, f -> getBoolean(format("nexus.%s.ha.supported", formatName), false)); return !isNexusClustered || formatForcedEnabled; } }
HighAvailabilitySupportChecker { public boolean isSupported(final String formatName) { boolean formatForcedEnabled = formatHAStates.computeIfAbsent(formatName, f -> getBoolean(format("nexus.%s.ha.supported", formatName), false)); return !isNexusClustered || formatForcedEnabled; } @Inject  HighAvailabilitySupportChecker(final NodeAccess nodeAccess); }
HighAvailabilitySupportChecker { public boolean isSupported(final String formatName) { boolean formatForcedEnabled = formatHAStates.computeIfAbsent(formatName, f -> getBoolean(format("nexus.%s.ha.supported", formatName), false)); return !isNexusClustered || formatForcedEnabled; } @Inject  HighAvailabilitySupportChecker(final NodeAccess nodeAccess); boolean isSupported(final String formatName); }
HighAvailabilitySupportChecker { public boolean isSupported(final String formatName) { boolean formatForcedEnabled = formatHAStates.computeIfAbsent(formatName, f -> getBoolean(format("nexus.%s.ha.supported", formatName), false)); return !isNexusClustered || formatForcedEnabled; } @Inject  HighAvailabilitySupportChecker(final NodeAccess nodeAccess); boolean isSupported(final String formatName);  }