Skip to content

Add from https://github.com/github/copilot-sdk-java/pull/233#1475

Merged
edburns merged 1 commit into
mainfrom
edburns/add-rekey-test
May 28, 2026
Merged

Add from https://github.com/github/copilot-sdk-java/pull/233#1475
edburns merged 1 commit into
mainfrom
edburns/add-rekey-test

Conversation

@edburns
Copy link
Copy Markdown
Collaborator

@edburns edburns commented May 27, 2026

Copilot AI review requested due to automatic review settings May 27, 2026 23:56
@edburns edburns requested a review from a team as a code owner May 27, 2026 23:56
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

Adds a new Java unit test class exercising the session-map "re-key" cleanup paths in CopilotClient.createSession — i.e. the case where the server returns a different sessionId than the client supplied, plus the failure-after-rekey and no-rekey cases. The test stands up an in-process socket-based fake JSON-RPC server and uses reflection to inject a Connection into CopilotClient.

Changes:

  • New CreateSessionReKeyEntryTest with an embedded ReKeyServer socket fake that replies to session.create and session.options.update.
  • Three test cases: successful re-key swaps the map key, failed session.options.update after re-key removes both old and new keys, and matching ids leave a single entry.
  • Uses reflection to read the private sessions map and to construct/inject the private Connection record via connectionFuture.
Show a summary per file
File Description
java/src/test/java/com/github/copilot/CreateSessionReKeyEntryTest.java New reflection-based unit test covering session-id re-keying in CopilotClient.createSession.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

@edburns edburns merged commit 44d1fd3 into main May 28, 2026
20 checks passed
@edburns edburns deleted the edburns/add-rekey-test branch May 28, 2026 00:02
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