Skip to content

Commit

Permalink
[release-2.10] chore: update the waiting time for publishing post (#4813
Browse files Browse the repository at this point in the history
)

This is an automated cherry-pick of #4810

/assign ruibaby

```release-note
修改发布文章的等待时间以防止因数据库执行延迟较高导致的错误提示
```
  • Loading branch information
halo-dev-bot committed Nov 2, 2023
1 parent ad21c10 commit 21fdfa3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ private Mono<Post> awaitPostPublished(String postName) {
})
.switchIfEmpty(Mono.error(
() -> new RetryException("Retry to check post publish status"))))
.retryWhen(Retry.fixedDelay(10, Duration.ofMillis(200))
.retryWhen(Retry.backoff(5, Duration.ofMillis(100))
.filter(t -> t instanceof RetryException));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ void shouldFailIfWaitTimeoutForPublishedStatus() {
.is5xxServerError();

// Verify WebClient retry behavior
verify(client, times(12)).get(eq(Post.class), eq("post-1"));
verify(client, times(7)).get(eq(Post.class), eq("post-1"));
verify(client).update(any(Post.class));
}

Expand Down

0 comments on commit 21fdfa3

Please sign in to comment.