Skip to content

fixes intermittent test errors occrued due to lagcy token usage#1306

Merged
sandeepbarnwal merged 1 commit into
cloudbees-oss:mainfrom
sandeepbarnwal:fix/intermittent-test-errors
May 28, 2026
Merged

fixes intermittent test errors occrued due to lagcy token usage#1306
sandeepbarnwal merged 1 commit into
cloudbees-oss:mainfrom
sandeepbarnwal:fix/intermittent-test-errors

Conversation

@sandeepbarnwal
Copy link
Copy Markdown
Contributor

@sandeepbarnwal sandeepbarnwal commented May 28, 2026

Summary

Replace LAUNCHABLE_TOKEN with SMART_TESTS_TOKEN in test_codeceptjs.py to fix test failures in a scenario when SMART_TESTS_TOKEN is already set in the environment before executing uv run poe test-xml.

Problem

LAUNCHABLE_TOKEN is only a fallback in get_token(). If SMART_TESTS_TOKEN was already set in the developer's environment, it took precedence over the injected mock token, causing requests to hit unregistered mock URLs and producing empty output that failed json.loads().

image

Fix

Use SMART_TESTS_TOKEN (the primary token) so mock.patch.dict always overwrites any real environment value. It becomes consistent with every other test file in the repo.

Copy link
Copy Markdown
Contributor

@Konboi Konboi left a comment

Choose a reason for hiding this comment

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

Thanks

@sandeepbarnwal sandeepbarnwal merged commit 5ae5fef into cloudbees-oss:main May 28, 2026
3 checks passed
@github-actions github-actions Bot mentioned this pull request May 28, 2026
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