这是indexloc提供的服务,不要输入任何密码
Skip to content

feat: implement graceful shutdown for subscription client #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 12, 2025

Conversation

rbroggi
Copy link

@rbroggi rbroggi commented May 12, 2025

Graceful shutdown for RunWithContext

@@ -567,3 +567,91 @@ func TestSubscription_closeThenRun(t *testing.T) {
t.Fatalf("got error: %v, want: nil", err)
}
}

// waitForConnectionState waits for the subscription client to reach a specific connection state
func waitForConnectionState(t *testing.T, sc *SubscriptionClient, tickerDuration time.Duration, timeout time.Duration, checkFn func() bool) bool {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utility method to avoid waiting for an established amount and delaying test execution.

Copy link

@hgiasac hgiasac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for contributing

@hgiasac hgiasac merged commit e838b20 into hasura:master May 12, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants