Cosmos: make invalid-session-token assertion emulator-agnostic; narrow Linux-emulator skips#38312
Draft
Copilot wants to merge 3 commits into
Draft
Cosmos: make invalid-session-token assertion emulator-agnostic; narrow Linux-emulator skips#38312Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
…sue #291) Agent-Logs-Url: https://github.com/dotnet/efcore/sessions/4f55855e-7fc7-42f6-b8d2-537427c6beb8 Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
…ows emulator wording Agent-Logs-Url: https://github.com/dotnet/efcore/sessions/45f81279-a6cc-4d8e-8d4c-4c8b5ef2dc56 Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
…iting emulator issues #322 and #319; remove diagnostic md files Agent-Logs-Url: https://github.com/dotnet/efcore/sessions/773a262b-df07-464f-9364-92c079d190c7 Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
AndriySvyryd
May 23, 2026 05:37
View session
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.
The Linux Cosmos emulator returns
"The session token provided 'invalidtoken' is not valid."while Windows / real service return"... is invalid.", causing 21 tests inCosmosSessionTokensTestto fail under the Linux emulator. The class was previously gated wholesale onIsNotLinuxEmulator, masking which tests were actually blocked by emulator bugs.Changes
[CosmosCondition(CosmosCondition.IsNotLinuxEmulator)]fromCosmosSessionTokensTestandCosmosNonSharedSessionTokenTests— most tests pass on Linux after the assertion fix.// https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/322—UseSessionTokens_uses_session_tokens,Read_item_session_not_found_throws_CosmosException// https://github.com/Azure/azure-cosmos-db-emulator-docker/issues/319—Optimistic_concurrency_precondition_failure_updates_session_token