From cabd64a05f33fd1be9562bdec7b9eca8089faf20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Greffier?= Date: Sun, 4 Aug 2024 12:14:31 +0200 Subject: [PATCH] Fix tests --- .../michelin/kstreamplify/server/KafkaStreamsHttpServer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kstreamplify-core/src/main/java/com/michelin/kstreamplify/server/KafkaStreamsHttpServer.java b/kstreamplify-core/src/main/java/com/michelin/kstreamplify/server/KafkaStreamsHttpServer.java index a69c135..c9d72e5 100644 --- a/kstreamplify-core/src/main/java/com/michelin/kstreamplify/server/KafkaStreamsHttpServer.java +++ b/kstreamplify-core/src/main/java/com/michelin/kstreamplify/server/KafkaStreamsHttpServer.java @@ -144,8 +144,9 @@ private Object getResponseForStoreEndpoints(HttpExchange exchange) { return interactiveQueriesService.getStateStores(); } - String store = parsePathParam(exchange, 3); + String store; if (exchange.getRequestURI().toString().matches("/" + DEFAULT_STORE_PATH + "/metadata/.*")) { + store = parsePathParam(exchange, 3); return interactiveQueriesService.getStreamsMetadataForStore(store) .stream() .map(streamsMetadata -> new StreamsMetadata( @@ -156,6 +157,7 @@ private Object getResponseForStoreEndpoints(HttpExchange exchange) { } if (exchange.getRequestURI().toString().matches("/" + DEFAULT_STORE_PATH + "/local/.*")) { + store = parsePathParam(exchange, 3); return interactiveQueriesService.getAllOnLocalhost(store); }