Conversation
client.counts() was unreachable via WebClient dynamic method
resolution. Use apiCall('client.counts') to match the pattern
used by all other undocumented Slack API calls.
Increase e2e test timeout to 30s for Slack API call latency, and parallelize cleanupMessages() so afterEach hooks complete within the timeout instead of cascading failures to all subsequent tests.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getUnreadCounts()used an unreachable API call pattern, and the default 5s test timeout was too short for Slack API cleanup inafterEachhooks — causing a cascade where one slow teardown fails every subsequent test.Changes
Slack API call pattern (
src/platforms/slack/client.ts)(this.client as any).client.counts()tothis.client.apiCall('client.counts')to match the pattern used by all other undocumented Slack API calls in the file. WebClient's dynamic method resolution cannot reach nested.client.counts(), making the old call silently fail.E2e test timeout (
bunfig.e2e.toml)timeout = 30000for e2e tests. The default 5s is insufficient for Slack API round-trips during test teardown, especiallycleanupMessages()which deletes multiple messages sequentially.Parallel cleanup (
e2e/helpers.ts)forloop withPromise.allincleanupMessages(). Deleting messages in parallel removes the per-messagewaitForRateLimit(500)delay that compounded across many messages, keeping teardown well within the 30s timeout.Testing
Summary by cubic
Fix Slack e2e failures by correcting the
client.countsAPI call and speeding up teardown. All 31 Slack tests now pass, avoiding timeout cascades.this.client.apiCall('client.counts')ingetUnreadCounts(); the previous nested call was unreachable.afterEach.cleanupMessages()to remove per-message delays.Written for commit 5db0445. Summary will update on new commits.