Skip to content

Commit

Permalink
change PUT for POST for easier usage in gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Loki-Afro committed Feb 9, 2024
1 parent 210b9e6 commit fc67ba3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/main/java/de/svs/NamespaceActivationWaiter.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ 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<OutboundSseEvent> waitForNamespaceToBecomeAvailable(String namespace) {
AtomicBoolean finalMessageReceived = new AtomicBoolean();

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")
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/svs/NamespaceController.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public RestMulti<OutboundSseEvent> extendAndWait(NamespaceDto dto) {

}

@PUT
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public NamespaceDto createNamespaceEntry(NamespaceDto dto) {
Expand Down

0 comments on commit fc67ba3

Please sign in to comment.