Skip to content

Fix Slack e2e test failures#48

Merged
devxoul merged 2 commits intomainfrom
fix/e2e-slack-test-failures
Mar 8, 2026
Merged

Fix Slack e2e test failures#48
devxoul merged 2 commits intomainfrom
fix/e2e-slack-test-failures

Conversation

@devxoul
Copy link
Owner

@devxoul devxoul commented Mar 8, 2026

Summary

  • Fix two independent issues causing 23 out of 31 Slack e2e tests to fail.
  • getUnreadCounts() used an unreachable API call pattern, and the default 5s test timeout was too short for Slack API cleanup in afterEach hooks — causing a cascade where one slow teardown fails every subsequent test.

Changes

Slack API call pattern (src/platforms/slack/client.ts)

  • Change (this.client as any).client.counts() to this.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)

  • Add timeout = 30000 for e2e tests. The default 5s is insufficient for Slack API round-trips during test teardown, especially cleanupMessages() which deletes multiple messages sequentially.

Parallel cleanup (e2e/helpers.ts)

  • Replace sequential for loop with Promise.all in cleanupMessages(). Deleting messages in parallel removes the per-message waitForRateLimit(500) delay that compounded across many messages, keeping teardown well within the 30s timeout.

Testing

  • Before: 8 pass / 23 fail (Slack)
  • After: 31 pass / 0 fail (Slack), 62 pass total across Slack + Slackbot + Discord

Summary by cubic

Fix Slack e2e failures by correcting the client.counts API call and speeding up teardown. All 31 Slack tests now pass, avoiding timeout cascades.

  • Bug Fixes
    • Use this.client.apiCall('client.counts') in getUnreadCounts(); the previous nested call was unreachable.
    • Increase e2e test timeout to 30s to allow Slack teardown in afterEach.
    • Delete messages in parallel in cleanupMessages() to remove per-message delays.

Written for commit 5db0445. Summary will update on new commits.

devxoul added 2 commits March 8, 2026 15:37
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.
@vercel
Copy link

vercel bot commented Mar 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
agent-messenger Ignored Ignored Mar 8, 2026 6:38am

Request Review

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

@devxoul devxoul merged commit 188cb0c into main Mar 8, 2026
5 checks passed
@devxoul devxoul deleted the fix/e2e-slack-test-failures branch March 8, 2026 06:49
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.

1 participant