test: unit test flakes for activity logs stream
Open
Nobody has claimed this yet.
code health
- Dominant language
- Go
- Stars
- 305
- Forks
- 46
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 23
Description
Summary
A recent test run on main failed for reasons unrelated to the recent commit. Perhaps a timing of a poll?
The retry succeeded! 🧪 ✨
Preview
🔗 https://github.com/slackapi/slack-cli/actions/runs/23178071163/job/67344594805
=== RUN TestPlatformActivity_StreamingLogs/should_return_nil_if_TailArg_is_set_and_activity_request_fails_while_polling
activity_test.go:267:
Error Trace: /Users/runner/work/slack-cli/slack-cli/internal/pkg/platform/activity_test.go:267
/Users/runner/work/slack-cli/slack-cli/internal/pkg/platform/activity_test.go:296
Error: Not equal:
expected: 3
actual : 4
Test: TestPlatformActivity_StreamingLogs/should_return_nil_if_TailArg_is_set_and_activity_request_fails_while_polling
Messages: Expected number of calls (3) of method Activity does not match the actual number of calls (4).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with internal/pkg/platform/activity_test.go around lines 249-269 and run the TestPlatformActivity_StreamingLogs case from the linked Actions failure. Investigate the polling timing behind the mismatch between the expected three Activity calls and the actual four, then verify the test reliably covers the request-failure behavior without flaking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100