Skip to content

Edburns/resolve fake test time token failures#172

Merged
edburns merged 3 commits intogithub:mainfrom
edburns:edburns/resolve-fake-test-time-token-failures
May 8, 2026
Merged

Edburns/resolve fake test time token failures#172
edburns merged 3 commits intogithub:mainfrom
edburns:edburns/resolve-fake-test-time-token-failures

Conversation

@edburns
Copy link
Copy Markdown
Collaborator

@edburns edburns commented May 8, 2026

No description provided.

edburns added 2 commits May 7, 2026 17:31
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>
Copilot AI review requested due to automatic review settings May 8, 2026 00:18
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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@edburns edburns merged commit 6be0443 into github:main May 8, 2026
3 checks passed
@edburns edburns deleted the edburns/resolve-fake-test-time-token-failures branch May 8, 2026 00:32
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