Skip to content

Commit

Permalink
fix: increase default pubsub health indicator timeout from 2000ms to …
Browse files Browse the repository at this point in the history
…5000ms (#3400)
  • Loading branch information
burkedavison authored Dec 19, 2024
1 parent aae9f99 commit b67caa9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/pubsub.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ So, take care not to configure a subscription that has a business impact, or ins
| Name | Description | Required | Default value
| `management.health.pubsub.enabled` | Whether to enable the Pub/Sub health indicator | No | `true` with Spring Boot Actuator, `false` otherwise
| `spring.cloud.gcp.pubsub.health.subscription` | Subscription to health check against by pulling a message | No | Random non-existent
| `spring.cloud.gcp.pubsub.health.timeout-millis` | Milliseconds to wait for response from Pub/Sub before timing out | No | `2000`
| `spring.cloud.gcp.pubsub.health.timeout-millis` | Milliseconds to wait for response from Pub/Sub before timing out | No | `5000`
| `spring.cloud.gcp.pubsub.health.acknowledge-messages` | Whether to acknowledge messages pulled from the optionally specified subscription | No | `false`
|===

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class PubSubHealthIndicatorProperties {
private String subscription;

/** Milliseconds to wait for response from Pub/Sub before timing out. */
private Long timeoutMillis = 2000L;
private Long timeoutMillis = 5000L;

/** Whether to acknowledge messages pulled from {@link #subscription}. */
private boolean acknowledgeMessages = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void healthIndicatorPresent_defaults() throws Exception {
PubSubHealthIndicator healthIndicator = ctx.getBean(PubSubHealthIndicator.class);
assertThat(healthIndicator).isNotNull();
assertThat(healthIndicator.getSubscription()).matches(UUID_PATTERN);
assertThat(healthIndicator.getTimeoutMillis()).isEqualTo(2000);
assertThat(healthIndicator.getTimeoutMillis()).isEqualTo(5000);
assertThat(healthIndicator.isAcknowledgeMessages()).isFalse();
assertThat(healthIndicator.isSpecifiedSubscription()).isFalse();
});
Expand Down

0 comments on commit b67caa9

Please sign in to comment.