diff --git a/src/main/java/de/svs/NamespaceActivationWaiter.java b/src/main/java/de/svs/NamespaceActivationWaiter.java index b2ba477..16ac556 100644 --- a/src/main/java/de/svs/NamespaceActivationWaiter.java +++ b/src/main/java/de/svs/NamespaceActivationWaiter.java @@ -24,11 +24,11 @@ public class NamespaceActivationWaiter { @ConfigProperty(name = "baseDomain") String baseDomain; - @ConfigProperty(name = "waiter.tries", defaultValue = "30") + @ConfigProperty(name = "waiter.tries", defaultValue = "60") int tries; - @ConfigProperty(name = "waiter.delay", defaultValue = "2") - int delay; + @ConfigProperty(name = "waiter.delayInSeconds", defaultValue = "2") + int delayInSeconds; Multi waitForNamespaceToBecomeAvailable(String namespace) { AtomicBoolean finalMessageReceived = new AtomicBoolean(); @@ -36,7 +36,7 @@ Multi waitForNamespaceToBecomeAvailable(String namespace) { return Multi.createBy() .repeating() .supplier(Unchecked.supplier(() -> new NamespaceStatus(objectMapper, baseDomain).get(namespace))) - .withDelay(Duration.ofSeconds(delay)) + .withDelay(Duration.ofSeconds(delayInSeconds)) .until(outboundSseEvent -> finalMessageReceived.getAndSet(outboundSseEvent.finalMessage())) .map(Unchecked.function(statusDto -> sse.newEventBuilder() .name("namespace-status") diff --git a/src/main/java/de/svs/NamespaceController.java b/src/main/java/de/svs/NamespaceController.java index e0fc3aa..f0cc1e5 100644 --- a/src/main/java/de/svs/NamespaceController.java +++ b/src/main/java/de/svs/NamespaceController.java @@ -133,7 +133,7 @@ public RestMulti extendAndWait(NamespaceDto dto) { } - @PUT + @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public NamespaceDto createNamespaceEntry(NamespaceDto dto) {