Edburns/resolve fake test time token failures#172
Merged
edburns merged 3 commits intogithub:mainfrom May 8, 2026
Merged
Conversation
modified: src/test/java/com/github/copilot/sdk/E2ETestContext.java modified: src/test/java/com/github/copilot/sdk/ExecutorWiringTest.java Given that the live API was never used, I see no reason why we should condition the setting of fake tokens on the runtime environment (CI vs local). The replaying proxy intercepts everything regardless of environment. The fake token just satisfies the CLI's startup check — it's never sent to a real API. The `GITHUB_ACTIONS` guard is unnecessary and is what broke local runs.
modified: pom.xml - Force deterministic ordering. modified: src/test/java/com/github/copilot/sdk/CapiProxy.java - Pass through the fake token concept. modified: src/test/java/com/github/copilot/sdk/CompactionTest.java - Skip flaky test, see github/copilot-sdk#1227 Signed-off-by: Ed Burns <edburns@microsoft.com>
Your branch is up to date with 'origin/edburns/resolve-fake-test-time-token-failures'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: src/test/java/com/github/copilot/sdk/CompactionTest.java no changes added to commit (use "git add" and/or "git commit -a") Signed-off-by: Ed Burns <edburns@microsoft.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Java SDK’s E2E test harness wiring to avoid authentication/token-related failures and reduce test flakiness in CI-like environments.
Changes:
- Make E2E tests consistently run with a known fake GitHub token (rather than conditionally depending on
GITHUB_ACTIONS). - Disable a known-flaky compaction E2E test with an upstream tracking issue link.
- Increase determinism in test execution by configuring Surefire to run tests in alphabetical order.
Show a summary per file
| File | Description |
|---|---|
src/test/java/com/github/copilot/sdk/ExecutorWiringTest.java |
Always supplies the fake token when constructing client options for executor wiring E2E tests. |
src/test/java/com/github/copilot/sdk/E2ETestContext.java |
Ensures clients created via the E2E context consistently use the fake token; simplifies CI-specific branching. |
src/test/java/com/github/copilot/sdk/CompactionTest.java |
Disables a flaky compaction snapshot test and documents the upstream issue reference. |
src/test/java/com/github/copilot/sdk/CapiProxy.java |
Forces the harness proxy process to run with GITHUB_ACTIONS=true to prefer fail-fast behavior on unmatched requests. |
pom.xml |
Sets Surefire <runOrder> to alphabetical to stabilize test ordering. |
Copilot's findings
- Files reviewed: 5/5 changed files
- Comments generated: 0
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.
No description provided.