ein wenig aufgeräumt

This commit is contained in:
stefan
2025-09-08 15:39:50 +02:00
parent 22d898aa14
commit 3e4ef8e73e
19 changed files with 1495 additions and 83 deletions
@@ -83,9 +83,10 @@ class PingServiceCircuitBreaker {
// Health check is now deterministic for reliable integration testing
// Random failures were causing intermittent test failures
val currentTime = LocalDateTime.now().atOffset(java.time.ZoneOffset.UTC).format(formatter)
return mapOf(
"status" to "UP",
"timestamp" to LocalDateTime.now().format(formatter),
"timestamp" to currentTime,
"circuitBreaker" to "CLOSED"
)
}
@@ -96,10 +97,11 @@ class PingServiceCircuitBreaker {
fun fallbackHealth(exception: Exception): Map<String, Any> {
logger.warn("Health check fallback triggered: {}", exception.message)
val currentTime = LocalDateTime.now().atOffset(java.time.ZoneOffset.UTC).format(formatter)
return mapOf(
"status" to "DOWN",
"message" to "Health check temporarily unavailable",
"timestamp" to LocalDateTime.now().format(formatter),
"timestamp" to currentTime,
"circuitBreaker" to "OPEN"
)
}
@@ -11,7 +11,7 @@ spring:
health-check-interval: 10s
server:
port: ${PING_SERVICE_PORT:8082}
port: ${SERVER_PORT:${PING_SERVICE_PORT:8082}}
management:
endpoints: