From 24f71cf29474b1e20a93dded64f8936e7af38e7a Mon Sep 17 00:00:00 2001 From: a10zn8 Date: Tue, 11 Jun 2024 16:54:01 +0300 Subject: [PATCH] fix test --- .../dshackle/upstream/generic/GenericUpstreamValidator.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/generic/GenericUpstreamValidator.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/generic/GenericUpstreamValidator.kt index f8458ac5c..4a5474294 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/generic/GenericUpstreamValidator.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/generic/GenericUpstreamValidator.kt @@ -8,7 +8,6 @@ import io.emeraldpay.dshackle.upstream.Upstream import io.emeraldpay.dshackle.upstream.UpstreamAvailability import io.emeraldpay.dshackle.upstream.UpstreamValidator import io.emeraldpay.dshackle.upstream.ValidateUpstreamSettingsResult -import io.emeraldpay.dshackle.upstream.ValidateUpstreamSettingsResult.UPSTREAM_VALID import reactor.core.publisher.Mono import java.util.concurrent.TimeoutException @@ -49,7 +48,7 @@ class GenericUpstreamValidator( startupValidators.map { exec(it, ValidateUpstreamSettingsResult.UPSTREAM_SETTINGS_ERROR) }, ) { a -> a.map { it as ValidateUpstreamSettingsResult } } .map(::resolve) - .defaultIfEmpty(ValidateUpstreamSettingsResult.UPSTREAM_FATAL_SETTINGS_ERROR) + .defaultIfEmpty(ValidateUpstreamSettingsResult.UPSTREAM_VALID) .onErrorResume { log.error("Error during upstream validation for ${upstream.getId()}", it) Mono.just(ValidateUpstreamSettingsResult.UPSTREAM_FATAL_SETTINGS_ERROR) @@ -57,6 +56,6 @@ class GenericUpstreamValidator( } override fun validateUpstreamSettingsOnStartup(): ValidateUpstreamSettingsResult { - return validateUpstreamSettings().block() ?: UPSTREAM_VALID + return validateUpstreamSettings().block() ?: ValidateUpstreamSettingsResult.UPSTREAM_VALID } }