From ddabe92bee8c6339d915e251268e8b3937f1a732 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Wed, 15 Apr 2026 20:36:33 -0400 Subject: [PATCH 01/46] Add ReadConsistencyStrategy RNTBD header and enable for all connection modes (#48094) - Add ReadConsistencyStrategy RNTBD header (0x00F0, String) to RntbdConstants and RntbdRequestHeaders for thin client proxy propagation - Replace Gateway-mode warn+ignore with client-side GLOBAL_STRONG validation that works across all modes (direct, gateway, thin client) - Update ReadConsistencyStrategy javadoc to reflect all-modes support - Add unit tests for RNTBD token encoding and round-trip - Add E2E tests for thin client and compute gateway ReadConsistencyStrategy Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...GatewayReadConsistencyStrategyE2ETest.java | 238 ++++++++++++++++ ...nClientReadConsistencyStrategyE2ETest.java | 258 ++++++++++++++++++ ...tbdReadConsistencyStrategyHeaderTests.java | 109 ++++++++ sdk/cosmos/azure-cosmos/CHANGELOG.md | 1 + .../azure/cosmos/ReadConsistencyStrategy.java | 3 +- .../implementation/ChangeFeedQueryImpl.java | 4 +- .../implementation/RxDocumentClientImpl.java | 30 +- .../rntbd/RntbdConstants.java | 3 +- .../rntbd/RntbdRequestHeaders.java | 13 + .../DocumentQueryExecutionContextBase.java | 4 +- .../query/IDocumentQueryClient.java | 2 +- 11 files changed, 644 insertions(+), 21 deletions(-) create mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java create mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java create mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java new file mode 100644 index 000000000000..5088226745b9 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos; + +import com.azure.cosmos.implementation.BadRequestException; +import com.azure.cosmos.implementation.HttpConstants; +import com.azure.cosmos.implementation.TestConfigurations; +import com.azure.cosmos.models.CosmosItemRequestOptions; +import com.azure.cosmos.models.CosmosItemResponse; +import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.FeedResponse; +import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.models.SqlParameter; +import com.azure.cosmos.models.SqlQuerySpec; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.Test; + +import java.util.Arrays; +import java.util.UUID; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.AssertionsForClassTypes.catchThrowable; + +/** + * E2E tests for ReadConsistencyStrategy through compute gateway (Gateway V1) mode. + * These tests verify that the HTTP header x-ms-cosmos-read-consistency-strategy is + * correctly sent to the compute gateway. + * + * Run with test group "fast" — uses standard account (no thin client required). + */ +public class GatewayReadConsistencyStrategyE2ETest { + private static final Logger logger = LoggerFactory.getLogger(GatewayReadConsistencyStrategyE2ETest.class); + private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + private static final long TIMEOUT = 60_000L; + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_readItem_withLatestCommitted() { + CosmosAsyncClient client = null; + try { + client = createGatewayBuilder().buildAsyncClient(); + CosmosAsyncContainer container = getTestContainer(client); + + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + + CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); + assertThat(ctx.getEffectiveReadConsistencyStrategy()) + .isEqualTo(ReadConsistencyStrategy.LATEST_COMMITTED); + } finally { + safeClose(client); + } + } + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_queryItems_withLatestCommitted() { + CosmosAsyncClient client = null; + try { + client = createGatewayBuilder().buildAsyncClient(); + CosmosAsyncContainer container = getTestContainer(client); + + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); + + CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() + .setPartitionKey(new PartitionKey(id)) + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + SqlQuerySpec querySpec = new SqlQuerySpec("SELECT * FROM c WHERE c.id=@id"); + querySpec.setParameters(Arrays.asList(new SqlParameter("@id", id))); + + FeedResponse response = container + .queryItems(querySpec, queryOptions, ObjectNode.class) + .byPage() + .blockFirst(); + + assertThat(response).isNotNull(); + assertThat(response.getResults()).isNotNull(); + } finally { + safeClose(client); + } + } + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_readItem_withEventual() { + CosmosAsyncClient client = null; + try { + client = createGatewayBuilder().buildAsyncClient(); + CosmosAsyncContainer container = getTestContainer(client); + + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); + + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + + CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); + assertThat(ctx.getEffectiveReadConsistencyStrategy()) + .isEqualTo(ReadConsistencyStrategy.EVENTUAL); + } finally { + safeClose(client); + } + } + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_readItem_clientLevel_latestCommitted() { + CosmosAsyncClient client = null; + try { + client = createGatewayBuilder() + .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) + .buildAsyncClient(); + CosmosAsyncContainer container = getTestContainer(client); + + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); + + // No request-level RCS — should inherit client-level LATEST_COMMITTED + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + + CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); + assertThat(ctx.getEffectiveReadConsistencyStrategy()) + .isEqualTo(ReadConsistencyStrategy.LATEST_COMMITTED); + } finally { + safeClose(client); + } + } + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_writeItem_rcsIgnored() { + CosmosAsyncClient client = null; + try { + client = createGatewayBuilder() + .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) + .buildAsyncClient(); + CosmosAsyncContainer container = getTestContainer(client); + + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + + // RCS is set at client level but should be forced to DEFAULT for writes + CosmosItemResponse response = + container.createItem(doc, new PartitionKey(id), null).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(201); + + CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); + assertThat(ctx.getEffectiveReadConsistencyStrategy()) + .isEqualTo(ReadConsistencyStrategy.DEFAULT); + } finally { + safeClose(client); + } + } + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_readItem_globalStrong_invalidAccount_throwsBadRequest() { + // This test assumes the account is NOT Strong consistency (e.g., Session) + // Setting GLOBAL_STRONG on a non-Strong account should throw BadRequestException + CosmosAsyncClient client = null; + try { + client = createGatewayBuilder().buildAsyncClient(); + CosmosAsyncContainer container = getTestContainer(client); + + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.GLOBAL_STRONG); + + Throwable thrown = catchThrowable(() -> + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block() + ); + + assertThat(thrown).isNotNull(); + // The BadRequestException may be wrapped in a CosmosException + assertThat(thrown.getMessage()).contains("ReadConsistencyStrategy"); + logger.info("Expected error for GLOBAL_STRONG on non-Strong account: {}", thrown.getMessage()); + } finally { + safeClose(client); + } + } + + private CosmosClientBuilder createGatewayBuilder() { + return new CosmosClientBuilder() + .endpoint(TestConfigurations.HOST) + .key(TestConfigurations.MASTER_KEY) + .gatewayMode() + .consistencyLevel(ConsistencyLevel.SESSION); + } + + private CosmosAsyncContainer getTestContainer(CosmosAsyncClient client) { + // Uses the shared multi-partition container + return client.getDatabase("db1").getContainer("c2"); + } + + private ObjectNode createDocument(String id) { + ObjectNode doc = OBJECT_MAPPER.createObjectNode(); + doc.put("id", id); + doc.put("partitionKey", id); + return doc; + } + + private static void safeClose(CosmosAsyncClient client) { + if (client != null) { + try { + client.close(); + } catch (Exception e) { + logger.warn("Failed to close client", e); + } + } + } +} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java new file mode 100644 index 000000000000..ace3c6d18955 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos.implementation; + +import com.azure.cosmos.ConsistencyLevel; +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.CosmosAsyncContainer; +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.cosmos.CosmosDiagnostics; +import com.azure.cosmos.CosmosDiagnosticsContext; +import com.azure.cosmos.CosmosDiagnosticsRequestInfo; +import com.azure.cosmos.FlakyTestRetryAnalyzer; +import com.azure.cosmos.ReadConsistencyStrategy; +import com.azure.cosmos.models.CosmosItemRequestOptions; +import com.azure.cosmos.models.CosmosItemResponse; +import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.FeedResponse; +import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.models.SqlParameter; +import com.azure.cosmos.models.SqlQuerySpec; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.Test; + +import java.util.Arrays; +import java.util.Collection; +import java.util.UUID; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; + +/** + * E2E tests for ReadConsistencyStrategy propagation through thin client (Gateway V2) mode. + * These tests verify that the RNTBD header 0x00F0 (ReadConsistencyStrategy) is correctly + * sent to the proxy and that the proxy applies the strategy server-side. + * + * Requires a thin-client-enabled account. Run with test group "thinclient". + */ +public class ThinClientReadConsistencyStrategyE2ETest { + private static final Logger logger = LoggerFactory.getLogger(ThinClientReadConsistencyStrategyE2ETest.class); + private static final String thinClientEndpointIndicator = ":10250/"; + private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_readItem_withLatestCommitted() { + CosmosAsyncClient client = null; + try { + client = createThinClientBuilder().buildAsyncClient(); + CosmosAsyncContainer container = client.getDatabase("db1").getContainer("c2"); + + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + + CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); + assertThat(ctx.getEffectiveReadConsistencyStrategy()) + .isEqualTo(ReadConsistencyStrategy.LATEST_COMMITTED); + assertThinClientEndpointUsed(response.getDiagnostics()); + } finally { + safeClose(client); + } + } + + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_queryItems_withLatestCommitted() { + CosmosAsyncClient client = null; + try { + client = createThinClientBuilder().buildAsyncClient(); + CosmosAsyncContainer container = client.getDatabase("db1").getContainer("c2"); + + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); + + CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() + .setPartitionKey(new PartitionKey(id)) + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + SqlQuerySpec querySpec = new SqlQuerySpec("SELECT * FROM c WHERE c.id=@id"); + querySpec.setParameters(Arrays.asList(new SqlParameter("@id", id))); + + FeedResponse response = container + .queryItems(querySpec, queryOptions, ObjectNode.class) + .byPage() + .blockFirst(); + + assertThat(response).isNotNull(); + assertThat(response.getResults()).isNotNull(); + assertThinClientEndpointUsed(response.getCosmosDiagnostics()); + } finally { + safeClose(client); + } + } + + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_readItem_withEventual() { + CosmosAsyncClient client = null; + try { + client = createThinClientBuilder().buildAsyncClient(); + CosmosAsyncContainer container = client.getDatabase("db1").getContainer("c2"); + + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); + + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + + CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); + assertThat(ctx.getEffectiveReadConsistencyStrategy()) + .isEqualTo(ReadConsistencyStrategy.EVENTUAL); + } finally { + safeClose(client); + } + } + + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_readItem_withSession() { + CosmosAsyncClient client = null; + try { + client = createThinClientBuilder().buildAsyncClient(); + CosmosAsyncContainer container = client.getDatabase("db1").getContainer("c2"); + + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.SESSION); + + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + + CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); + assertThat(ctx.getEffectiveReadConsistencyStrategy()) + .isEqualTo(ReadConsistencyStrategy.SESSION); + } finally { + safeClose(client); + } + } + + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_readItem_clientLevel_latestCommitted() { + CosmosAsyncClient client = null; + try { + client = createThinClientBuilder() + .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) + .buildAsyncClient(); + CosmosAsyncContainer container = client.getDatabase("db1").getContainer("c2"); + + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); + + // No request-level RCS — should inherit client-level LATEST_COMMITTED + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + + CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); + assertThat(ctx.getEffectiveReadConsistencyStrategy()) + .isEqualTo(ReadConsistencyStrategy.LATEST_COMMITTED); + } finally { + safeClose(client); + } + } + + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_writeItem_rcsIgnored() { + CosmosAsyncClient client = null; + try { + client = createThinClientBuilder() + .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) + .buildAsyncClient(); + CosmosAsyncContainer container = client.getDatabase("db1").getContainer("c2"); + + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + + // RCS is set at client level but should be forced to DEFAULT for writes + CosmosItemResponse response = + container.createItem(doc, new PartitionKey(id), null).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(201); + + CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); + assertThat(ctx.getEffectiveReadConsistencyStrategy()) + .isEqualTo(ReadConsistencyStrategy.DEFAULT); + } finally { + safeClose(client); + } + } + + private CosmosClientBuilder createThinClientBuilder() { + return new CosmosClientBuilder() + .endpoint(TestConfigurations.HOST) + .key(TestConfigurations.MASTER_KEY) + .gatewayMode() + .consistencyLevel(ConsistencyLevel.SESSION); + } + + private ObjectNode createDocument(String id) { + ObjectNode doc = OBJECT_MAPPER.createObjectNode(); + doc.put("id", id); + doc.put("partitionKey", id); + return doc; + } + + private static void assertThinClientEndpointUsed(CosmosDiagnostics diagnostics) { + assertThat(diagnostics).isNotNull(); + CosmosDiagnosticsContext ctx = diagnostics.getDiagnosticsContext(); + assertThat(ctx).isNotNull(); + + Collection requests = ctx.getRequestInfo(); + assertThat(requests).isNotNull(); + assertThat(requests.size()).isPositive(); + + for (CosmosDiagnosticsRequestInfo requestInfo : requests) { + logger.info("Endpoint: {}, RequestType: {}", requestInfo.getEndpoint(), requestInfo.getRequestType()); + if (requestInfo.getEndpoint().contains(thinClientEndpointIndicator)) { + return; + } + } + org.assertj.core.api.Assertions.fail("Expected at least one request to use thin client endpoint (:10250/)"); + } + + private static void safeClose(CosmosAsyncClient client) { + if (client != null) { + try { + client.close(); + } catch (Exception e) { + logger.warn("Failed to close client", e); + } + } + } +} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java new file mode 100644 index 000000000000..daf2c87368dd --- /dev/null +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos.implementation.directconnectivity.rntbd; + +import com.azure.cosmos.ReadConsistencyStrategy; +import com.azure.cosmos.implementation.HttpConstants; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; + +public class RntbdReadConsistencyStrategyHeaderTests { + + @DataProvider(name = "readConsistencyStrategyValues") + public Object[][] readConsistencyStrategyValues() { + return new Object[][] { + { ReadConsistencyStrategy.EVENTUAL, "Eventual" }, + { ReadConsistencyStrategy.SESSION, "Session" }, + { ReadConsistencyStrategy.LATEST_COMMITTED, "LatestCommitted" }, + { ReadConsistencyStrategy.GLOBAL_STRONG, "GlobalStrong" }, + { ReadConsistencyStrategy.DEFAULT, "Default" }, + }; + } + + @Test(groups = { "unit" }, dataProvider = "readConsistencyStrategyValues") + public void readConsistencyStrategyTokenEncodesCorrectly( + ReadConsistencyStrategy strategy, + String expectedOverWireValue) { + + RntbdToken token = RntbdToken.create( + RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); + assertThat(token).isNotNull(); + assertThat(token.isPresent()).isFalse(); + + token.setValue(expectedOverWireValue); + assertThat(token.isPresent()).isTrue(); + assertThat(token.getValue()).isEqualTo(expectedOverWireValue); + } + + @Test(groups = { "unit" }) + public void readConsistencyStrategyHeaderId() { + assertThat(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy.id()) + .isEqualTo((short) 0x00F0); + } + + @Test(groups = { "unit" }) + public void readConsistencyStrategyHeaderType() { + assertThat(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy.type()) + .isEqualTo(RntbdTokenType.String); + } + + @Test(groups = { "unit" }) + public void readConsistencyStrategyHeaderNotRequired() { + assertThat(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy.isRequired()) + .isFalse(); + } + + @Test(groups = { "unit" }) + public void readConsistencyStrategyTokenNotPresentWhenNotSet() { + RntbdToken token = RntbdToken.create( + RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); + assertThat(token.isPresent()).isFalse(); + } + + @Test(groups = { "unit" }, dataProvider = "readConsistencyStrategyValues") + public void readConsistencyStrategyTokenRoundTrips( + ReadConsistencyStrategy strategy, + String expectedOverWireValue) { + + // Encode + RntbdToken token = RntbdToken.create( + RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); + token.setValue(expectedOverWireValue); + + ByteBuf buffer = Unpooled.buffer(256); + try { + token.encode(buffer); + + // Decode + RntbdToken decodedToken = RntbdToken.create( + RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); + // skip 3 bytes: 2 for header id + 1 for token type + buffer.readerIndex(3); + decodedToken.decode(buffer); + + assertThat(decodedToken.isPresent()).isTrue(); + assertThat(decodedToken.getValue().toString()).isEqualTo(expectedOverWireValue); + } finally { + buffer.release(); + } + } + + @Test(groups = { "unit" }) + public void readConsistencyStrategyOverWireValuesMatchEnum() { + assertThat(ReadConsistencyStrategy.EVENTUAL.toString()).isEqualTo("Eventual"); + assertThat(ReadConsistencyStrategy.SESSION.toString()).isEqualTo("Session"); + assertThat(ReadConsistencyStrategy.LATEST_COMMITTED.toString()).isEqualTo("LatestCommitted"); + assertThat(ReadConsistencyStrategy.GLOBAL_STRONG.toString()).isEqualTo("GlobalStrong"); + assertThat(ReadConsistencyStrategy.DEFAULT.toString()).isEqualTo("Default"); + } + + @Test(groups = { "unit" }) + public void readConsistencyStrategyHttpHeaderConstant() { + assertThat(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY) + .isEqualTo("x-ms-cosmos-read-consistency-strategy"); + } +} diff --git a/sdk/cosmos/azure-cosmos/CHANGELOG.md b/sdk/cosmos/azure-cosmos/CHANGELOG.md index c17648b95294..ead4af259f25 100644 --- a/sdk/cosmos/azure-cosmos/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos/CHANGELOG.md @@ -4,6 +4,7 @@ #### Features Added * Added support for change feed with `startFrom` point-in-time on merged partitions by enabling the `CHANGE_FEED_WITH_START_TIME_POST_MERGE` SDK capability. - See [PR 48752](https://github.com/Azure/azure-sdk-for-java/pull/48752) +* Added RNTBD header encoding for `ReadConsistencyStrategy` to enable thin client (Gateway V2) and compute gateway (Gateway V1) propagation. `ReadConsistencyStrategy` is now supported in all connection modes (direct, gateway, thin client). Also added client-side validation for `GLOBAL_STRONG` on non-Strong consistency accounts. - See [PR 48787](https://github.com/Azure/azure-sdk-for-java/pull/48787) #### Breaking Changes diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java index f8e094a37164..d9ebe2538fe8 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java @@ -22,7 +22,8 @@ * in RequestOptions, CosmosClient or the default consistency level for an account unless * ReadConsistencyStrategy `DEFAULT` is used. *

- * NOTE: The ReadConsistencyStrategy is currently only working when using direct mode + * NOTE: The ReadConsistencyStrategy is supported in direct mode, thin client (Gateway V2) mode, + * and gateway mode */ @Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING) public enum ReadConsistencyStrategy { diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ChangeFeedQueryImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ChangeFeedQueryImpl.java index c8bca12fcbf4..9e3ffc4efab5 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ChangeFeedQueryImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ChangeFeedQueryImpl.java @@ -147,7 +147,7 @@ private RxDocumentServiceRequest createDocumentServiceRequest() { if (this.options.getReadConsistencyStrategy() != null) { String readConsistencyStrategyName = options.getReadConsistencyStrategy().toString(); - this.client.validateAndLogNonDefaultReadConsistencyStrategy(readConsistencyStrategyName); + this.client.validateReadConsistencyStrategy(options.getReadConsistencyStrategy()); headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, readConsistencyStrategyName); consistencyLevelOverrideApplicable = @@ -156,7 +156,7 @@ private RxDocumentServiceRequest createDocumentServiceRequest() { if (consistencyLevelOverrideApplicable && this.client.getReadConsistencyStrategy() != null) { String readConsistencyStrategyName = this.client.getReadConsistencyStrategy().toString(); - this.client.validateAndLogNonDefaultReadConsistencyStrategy(readConsistencyStrategyName); + this.client.validateReadConsistencyStrategy(this.client.getReadConsistencyStrategy()); headers.put( HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, readConsistencyStrategyName); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java index 11121bca033e..2a6acc9bac3c 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java @@ -1925,16 +1925,18 @@ private static void validateResource(Resource resource) { } } - public void validateAndLogNonDefaultReadConsistencyStrategy(String readConsistencyStrategyName) { - if (this.connectionPolicy.getConnectionMode() != ConnectionMode.DIRECT - && readConsistencyStrategyName != null - && ! readConsistencyStrategyName.equalsIgnoreCase(ReadConsistencyStrategy.DEFAULT.toString())) { - - logger.warn( - "ReadConsistencyStrategy {} defined in Gateway mode. " - + "This version of the SDK only supports ReadConsistencyStrategy in DIRECT mode. " - + "This setting will be ignored.", - readConsistencyStrategyName); + public void validateReadConsistencyStrategy(ReadConsistencyStrategy readConsistencyStrategy) { + if (readConsistencyStrategy == ReadConsistencyStrategy.GLOBAL_STRONG) { + ConsistencyLevel accountConsistency = this.getDefaultConsistencyLevelOfAccount(); + if (accountConsistency != ConsistencyLevel.STRONG) { + throw new BadRequestException( + String.format( + RMResources.ReadConsistencyStrategyGlobalStrongOnlyAllowedForGlobalStrongAccount, + readConsistencyStrategy.toString(), + HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, + ConsistencyLevel.STRONG, + accountConsistency)); + } } } @@ -1961,7 +1963,7 @@ private Map getRequestHeaders(RequestOptions options, ResourceTy && operationType.isReadOnlyOperation()) { String readConsistencyStrategyName = readConsistencyStrategy.toString(); - this.validateAndLogNonDefaultReadConsistencyStrategy(readConsistencyStrategyName); + this.validateReadConsistencyStrategy(readConsistencyStrategy); headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, readConsistencyStrategyName); } @@ -2006,7 +2008,7 @@ private Map getRequestHeaders(RequestOptions options, ResourceTy && operationType.isReadOnlyOperation()) { String readConsistencyStrategyName = options.getReadConsistencyStrategy().toString(); - this.validateAndLogNonDefaultReadConsistencyStrategy(readConsistencyStrategyName); + this.validateReadConsistencyStrategy(options.getReadConsistencyStrategy()); headers.put( HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, readConsistencyStrategyName); @@ -4728,8 +4730,8 @@ public ConsistencyLevel getConsistencyLevel() { } @Override - public void validateAndLogNonDefaultReadConsistencyStrategy(String readConsistencyStrategyName) { - RxDocumentClientImpl.this.validateAndLogNonDefaultReadConsistencyStrategy(readConsistencyStrategyName); + public void validateReadConsistencyStrategy(ReadConsistencyStrategy readConsistencyStrategy) { + RxDocumentClientImpl.this.validateReadConsistencyStrategy(readConsistencyStrategy); } @Override diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java index 40b9b82f6e3d..13831442792b 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java @@ -599,7 +599,8 @@ public enum RntbdRequestHeader implements RntbdHeader { GlobalDatabaseAccountName((short) 0x00CE, RntbdTokenType.String, false), ThroughputBucket((short)0x00DB, RntbdTokenType.Byte, false), PopulateQueryAdvice((short) 0x00DA, RntbdTokenType.Byte, false), - HubRegionProcessingOnly((short)0x00EF, RntbdTokenType.Byte , false); + HubRegionProcessingOnly((short)0x00EF, RntbdTokenType.Byte , false), + ReadConsistencyStrategy((short)0x00F0, RntbdTokenType.String, false); public static final List thinClientHeadersInOrderList = Arrays.asList( EffectivePartitionKey, diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java index 41b820a1ad95..64c8f856c7e0 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java @@ -139,6 +139,7 @@ private static ImplementationBridgeHelpers.PriorityLevelHelper.PriorityLevelAcce this.addThroughputBucket(headers); this.addPopulateQueryAdvice(headers); this.addHubRegionProcessingOnly(headers); + this.addReadConsistencyStrategy(headers); // Normal headers (Strings, Ints, Longs, etc.) @@ -828,6 +829,18 @@ private void addHubRegionProcessingOnly(final Map headers) { } } + private RntbdToken getReadConsistencyStrategy() { + return this.get(RntbdRequestHeader.ReadConsistencyStrategy); + } + + private void addReadConsistencyStrategy(final Map headers) { + final String value = headers.get(HttpHeaders.READ_CONSISTENCY_STRATEGY); + + if (StringUtils.isNotEmpty(value)) { + this.getReadConsistencyStrategy().setValue(value); + } + } + private void addGlobalDatabaseAccountName(final Map headers) { final String value = headers.get(HttpHeaders.GLOBAL_DATABASE_ACCOUNT_NAME); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/query/DocumentQueryExecutionContextBase.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/query/DocumentQueryExecutionContextBase.java index 519dfaecebaf..a6bd918559cf 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/query/DocumentQueryExecutionContextBase.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/query/DocumentQueryExecutionContextBase.java @@ -301,7 +301,7 @@ public Map createCommonHeadersAsync(CosmosQueryRequestOptions co if (cosmosQueryRequestOptions.getReadConsistencyStrategy() != null) { String readConsistencyStrategyName = cosmosQueryRequestOptions.getReadConsistencyStrategy().toString(); - this.client.validateAndLogNonDefaultReadConsistencyStrategy(readConsistencyStrategyName); + this.client.validateReadConsistencyStrategy(cosmosQueryRequestOptions.getReadConsistencyStrategy()); requestHeaders.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, readConsistencyStrategyName); consistencyLevelOverrideApplicable = @@ -310,7 +310,7 @@ public Map createCommonHeadersAsync(CosmosQueryRequestOptions co if (consistencyLevelOverrideApplicable && this.client.getReadConsistencyStrategy() != null) { String readConsistencyStrategyName = this.client.getReadConsistencyStrategy().toString(); - this.client.validateAndLogNonDefaultReadConsistencyStrategy(readConsistencyStrategyName); + this.client.validateReadConsistencyStrategy(this.client.getReadConsistencyStrategy()); requestHeaders.put( HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, readConsistencyStrategyName); diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/query/IDocumentQueryClient.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/query/IDocumentQueryClient.java index 8555efc5487a..91679d40490e 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/query/IDocumentQueryClient.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/query/IDocumentQueryClient.java @@ -74,7 +74,7 @@ Mono executeFeedOperationWithAvailabilityStrategy( ConsistencyLevel getConsistencyLevel(); - void validateAndLogNonDefaultReadConsistencyStrategy(String readConsistencyStrategyName); + void validateReadConsistencyStrategy(ReadConsistencyStrategy readConsistencyStrategy); ///

/// A client query compatibility mode when making query request. From faa9ccf227642f709e0183f65f77f81e8c5d9b11 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Wed, 15 Apr 2026 21:33:36 -0400 Subject: [PATCH 02/46] Fix: prevent x-ms-consistency-level rewrite in gateway mode when RCS is set (#48094) RxGatewayStoreModel.applySessionToken() called RequestHelper.getReadConsistencyStrategyToUse() which had a side-effect of rewriting x-ms-consistency-level header (e.g., LATEST_COMMITTED mapped to BoundedStaleness). The compute gateway rejected this because BoundedStaleness is stricter than the Session account default. Fix: Use a copy of the headers map so the original x-ms-consistency-level is preserved. Gateway/proxy now sees: - x-ms-consistency-level: Session (original, unchanged) - x-ms-cosmos-read-consistency-strategy: LatestCommitted (RCS intent) Verified E2E: LATEST_COMMITTED, EVENTUAL, SESSION, client-level RCS all return 200. GLOBAL_STRONG correctly throws BadRequestException on Session account. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../cosmos/implementation/RxGatewayStoreModel.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java index 81a553f01547..0e341c7b77db 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java @@ -981,8 +981,15 @@ private Mono applySessionToken(RxDocumentServiceRequest request) { return Mono.empty(); } - boolean sessionConsistency = (RequestHelper.getReadConsistencyStrategyToUse(this.gatewayServiceConfigurationReader, - request) == ReadConsistencyStrategy.SESSION); + // Use a copy of the headers to prevent the side-effect of + // RequestHelper.getReadConsistencyStrategyToUse() rewriting x-ms-consistency-level. + // In gateway mode, x-ms-consistency-level must stay as the original account/client level — + // only x-ms-cosmos-read-consistency-strategy carries the RCS intent to the gateway/proxy. + boolean sessionConsistency = (RequestHelper.getReadConsistencyStrategyToUse( + new HashMap<>(request.getHeaders()), + request.requestContext != null ? request.requestContext.readConsistencyStrategy : null, + this.gatewayServiceConfigurationReader.getDefaultConsistencyLevel()) + == ReadConsistencyStrategy.SESSION); if (!Strings.isNullOrEmpty(request.getHeaders().get(HttpConstants.HttpHeaders.SESSION_TOKEN))) { if (!sessionConsistency || From 6c0913c72be138cd40c0225a3b689cbd1387c186 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Wed, 15 Apr 2026 23:24:53 -0400 Subject: [PATCH 03/46] Fix: strip x-ms-consistency-level when ReadConsistencyStrategy is set (#48094) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compute gateway rejects requests containing both x-ms-consistency-level and x-ms-cosmos-read-consistency-strategy headers. When RCS is non-DEFAULT, remove the consistency-level header — RCS takes precedence. Applied to both client-level and request-options-level RCS paths in RxDocumentClientImpl.getRequestHeaders(). Verified E2E against test4 compute gateway (swkrish-session, Session account): LATEST_COMMITTED, EVENTUAL, SESSION, client-level RCS all return 200. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../azure/cosmos/implementation/RxDocumentClientImpl.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java index 2a6acc9bac3c..e6adc1567b4e 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java @@ -1965,6 +1965,10 @@ private Map getRequestHeaders(RequestOptions options, ResourceTy String readConsistencyStrategyName = readConsistencyStrategy.toString(); this.validateReadConsistencyStrategy(readConsistencyStrategy); headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, readConsistencyStrategyName); + // Compute gateway rejects requests with both x-ms-consistency-level and + // x-ms-cosmos-read-consistency-strategy headers. When RCS is set, remove + // consistency-level — RCS takes precedence. + headers.remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); } if (options == null) { @@ -2012,6 +2016,10 @@ private Map getRequestHeaders(RequestOptions options, ResourceTy headers.put( HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, readConsistencyStrategyName); + // Compute gateway rejects requests with both x-ms-consistency-level and + // x-ms-cosmos-read-consistency-strategy headers. When RCS is set, remove + // consistency-level — RCS takes precedence. + headers.remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); } if (options.getConsistencyLevel() != null) { From a6c0b5027a86cd827acdad1a5a4e827f7a20ca57 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 16 Apr 2026 00:20:10 -0400 Subject: [PATCH 04/46] Fix: change ReadConsistencyStrategy RNTBD token type from String to Byte (#48094) The proxy expects ReadConsistencyStrategy as a Byte enum, not a String: Eventual=1, Session=2, LatestCommitted=3, GlobalStrong=4 With String type, the proxy couldn't parse the RNTBD frame and hung. With Byte type, thin client reads work correctly through the proxy. Added RntbdReadConsistencyStrategy enum to RntbdConstants matching the proxy's ReadConsistencyStrategy.h enum values. Verified E2E against test4 thin client proxy (swkrish-session): SESSION, EVENTUAL, LATEST_COMMITTED all return 200 with tc=true. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../rntbd/RntbdConstants.java | 20 ++++++++++++++++++- .../rntbd/RntbdRequestHeaders.java | 17 +++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java index 13831442792b..34bdde18c453 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java @@ -27,6 +27,24 @@ public static class RntbdHealthCheckResults { public static final String SuccessValue = "Success"; } + public enum RntbdReadConsistencyStrategy { + + Eventual((byte) 0x01), + Session((byte) 0x02), + LatestCommitted((byte) 0x03), + GlobalStrong((byte) 0x04); + + private final byte id; + + RntbdReadConsistencyStrategy(final byte id) { + this.id = id; + } + + public byte id() { + return this.id; + } + } + public enum RntbdConsistencyLevel { Strong((byte) 0x00), @@ -600,7 +618,7 @@ public enum RntbdRequestHeader implements RntbdHeader { ThroughputBucket((short)0x00DB, RntbdTokenType.Byte, false), PopulateQueryAdvice((short) 0x00DA, RntbdTokenType.Byte, false), HubRegionProcessingOnly((short)0x00EF, RntbdTokenType.Byte , false), - ReadConsistencyStrategy((short)0x00F0, RntbdTokenType.String, false); + ReadConsistencyStrategy((short)0x00F0, RntbdTokenType.Byte, false); public static final List thinClientHeadersInOrderList = Arrays.asList( EffectivePartitionKey, diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java index 64c8f856c7e0..66eee58ee81d 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java @@ -837,7 +837,22 @@ private void addReadConsistencyStrategy(final Map headers) { final String value = headers.get(HttpHeaders.READ_CONSISTENCY_STRATEGY); if (StringUtils.isNotEmpty(value)) { - this.getReadConsistencyStrategy().setValue(value); + switch (value) { + case "Eventual": + this.getReadConsistencyStrategy().setValue(RntbdConstants.RntbdReadConsistencyStrategy.Eventual.id()); + break; + case "Session": + this.getReadConsistencyStrategy().setValue(RntbdConstants.RntbdReadConsistencyStrategy.Session.id()); + break; + case "LatestCommitted": + this.getReadConsistencyStrategy().setValue(RntbdConstants.RntbdReadConsistencyStrategy.LatestCommitted.id()); + break; + case "GlobalStrong": + this.getReadConsistencyStrategy().setValue(RntbdConstants.RntbdReadConsistencyStrategy.GlobalStrong.id()); + break; + default: + break; + } } } From db3ee0ca22d01f60f9e97812ec869b73528e3527 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 16 Apr 2026 00:46:19 -0400 Subject: [PATCH 05/46] Update E2E tests: dynamic database/container creation, use TestConfigurations (#48094) Removed hardcoded database/container names. Tests now: - Create a unique database and container in @BeforeClass - Clean up in @AfterClass - Use TestConfigurations.HOST/MASTER_KEY from cosmos-v4.properties - Use /pk as partition key path Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...GatewayReadConsistencyStrategyE2ETest.java | 219 +++++++++--------- ...nClientReadConsistencyStrategyE2ETest.java | 214 +++++++++-------- 2 files changed, 210 insertions(+), 223 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java index 5088226745b9..04728a61c30b 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java @@ -2,9 +2,8 @@ // Licensed under the MIT License. package com.azure.cosmos; -import com.azure.cosmos.implementation.BadRequestException; -import com.azure.cosmos.implementation.HttpConstants; import com.azure.cosmos.implementation.TestConfigurations; +import com.azure.cosmos.models.CosmosContainerProperties; import com.azure.cosmos.models.CosmosItemRequestOptions; import com.azure.cosmos.models.CosmosItemResponse; import com.azure.cosmos.models.CosmosQueryRequestOptions; @@ -12,10 +11,13 @@ import com.azure.cosmos.models.PartitionKey; import com.azure.cosmos.models.SqlParameter; import com.azure.cosmos.models.SqlQuerySpec; +import com.azure.cosmos.models.ThroughputProperties; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.Arrays; @@ -26,184 +28,176 @@ /** * E2E tests for ReadConsistencyStrategy through compute gateway (Gateway V1) mode. - * These tests verify that the HTTP header x-ms-cosmos-read-consistency-strategy is - * correctly sent to the compute gateway. + * Verifies that the HTTP header x-ms-cosmos-read-consistency-strategy is + * correctly sent to the compute gateway and processed. * - * Run with test group "fast" — uses standard account (no thin client required). + * Uses TestConfigurations for account credentials. + * Run with test group "fast". */ public class GatewayReadConsistencyStrategyE2ETest { private static final Logger logger = LoggerFactory.getLogger(GatewayReadConsistencyStrategyE2ETest.class); private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); private static final long TIMEOUT = 60_000L; - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_readItem_withLatestCommitted() { - CosmosAsyncClient client = null; - try { - client = createGatewayBuilder().buildAsyncClient(); - CosmosAsyncContainer container = getTestContainer(client); + private CosmosAsyncClient client; + private CosmosAsyncDatabase database; + private CosmosAsyncContainer container; + private String databaseId; + private String containerId; - String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + @BeforeClass(groups = {"fast"}) + public void beforeClass() { + client = createGatewayBuilder().buildAsyncClient(); - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + databaseId = "rcs-gateway-test-" + UUID.randomUUID().toString().substring(0, 8); + containerId = "testcontainer"; - CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + client.createDatabaseIfNotExists(databaseId).block(); + database = client.getDatabase(databaseId); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); + CosmosContainerProperties containerProperties = new CosmosContainerProperties(containerId, "/pk"); + database.createContainerIfNotExists(containerProperties, ThroughputProperties.createManualThroughput(400)).block(); + container = database.getContainer(containerId); - CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); - assertThat(ctx.getEffectiveReadConsistencyStrategy()) - .isEqualTo(ReadConsistencyStrategy.LATEST_COMMITTED); - } finally { - safeClose(client); + logger.info("Created test database {} and container {}", databaseId, containerId); + } + + @AfterClass(groups = {"fast"}, alwaysRun = true) + public void afterClass() { + if (database != null) { + try { + database.delete().block(); + logger.info("Deleted test database {}", databaseId); + } catch (Exception e) { + logger.warn("Failed to delete test database", e); + } } + safeClose(client); } @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_queryItems_withLatestCommitted() { - CosmosAsyncClient client = null; - try { - client = createGatewayBuilder().buildAsyncClient(); - CosmosAsyncContainer container = getTestContainer(client); + public void gateway_readItem_withLatestCommitted() { + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); - String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() - .setPartitionKey(new PartitionKey(id)) - .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - SqlQuerySpec querySpec = new SqlQuerySpec("SELECT * FROM c WHERE c.id=@id"); - querySpec.setParameters(Arrays.asList(new SqlParameter("@id", id))); + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) + .isEqualTo(ReadConsistencyStrategy.LATEST_COMMITTED); + } - FeedResponse response = container - .queryItems(querySpec, queryOptions, ObjectNode.class) - .byPage() - .blockFirst(); + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_queryItems_withLatestCommitted() { + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); - assertThat(response).isNotNull(); - assertThat(response.getResults()).isNotNull(); - } finally { - safeClose(client); - } + CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() + .setPartitionKey(new PartitionKey(id)) + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + SqlQuerySpec querySpec = new SqlQuerySpec("SELECT * FROM c WHERE c.id=@id"); + querySpec.setParameters(Arrays.asList(new SqlParameter("@id", id))); + + FeedResponse response = container + .queryItems(querySpec, queryOptions, ObjectNode.class) + .byPage() + .blockFirst(); + + assertThat(response).isNotNull(); + assertThat(response.getResults()).isNotNull(); } @Test(groups = {"fast"}, timeOut = TIMEOUT) public void gateway_readItem_withEventual() { - CosmosAsyncClient client = null; - try { - client = createGatewayBuilder().buildAsyncClient(); - CosmosAsyncContainer container = getTestContainer(client); - - String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); - - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); - CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); - assertThat(ctx.getEffectiveReadConsistencyStrategy()) - .isEqualTo(ReadConsistencyStrategy.EVENTUAL); - } finally { - safeClose(client); - } + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) + .isEqualTo(ReadConsistencyStrategy.EVENTUAL); } @Test(groups = {"fast"}, timeOut = TIMEOUT) public void gateway_readItem_clientLevel_latestCommitted() { - CosmosAsyncClient client = null; + CosmosAsyncClient clientWithRcs = null; try { - client = createGatewayBuilder() + clientWithRcs = createGatewayBuilder() .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) .buildAsyncClient(); - CosmosAsyncContainer container = getTestContainer(client); + CosmosAsyncContainer containerWithRcs = clientWithRcs.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + containerWithRcs.createItem(doc, new PartitionKey(id), null).block(); - // No request-level RCS — should inherit client-level LATEST_COMMITTED CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), ObjectNode.class).block(); + containerWithRcs.readItem(id, new PartitionKey(id), ObjectNode.class).block(); assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - - CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); - assertThat(ctx.getEffectiveReadConsistencyStrategy()) + assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) .isEqualTo(ReadConsistencyStrategy.LATEST_COMMITTED); } finally { - safeClose(client); + safeClose(clientWithRcs); } } @Test(groups = {"fast"}, timeOut = TIMEOUT) public void gateway_writeItem_rcsIgnored() { - CosmosAsyncClient client = null; + CosmosAsyncClient clientWithRcs = null; try { - client = createGatewayBuilder() + clientWithRcs = createGatewayBuilder() .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) .buildAsyncClient(); - CosmosAsyncContainer container = getTestContainer(client); + CosmosAsyncContainer containerWithRcs = clientWithRcs.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); ObjectNode doc = createDocument(id); - // RCS is set at client level but should be forced to DEFAULT for writes CosmosItemResponse response = - container.createItem(doc, new PartitionKey(id), null).block(); + containerWithRcs.createItem(doc, new PartitionKey(id), null).block(); assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(201); - - CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); - assertThat(ctx.getEffectiveReadConsistencyStrategy()) + assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) .isEqualTo(ReadConsistencyStrategy.DEFAULT); } finally { - safeClose(client); + safeClose(clientWithRcs); } } @Test(groups = {"fast"}, timeOut = TIMEOUT) public void gateway_readItem_globalStrong_invalidAccount_throwsBadRequest() { - // This test assumes the account is NOT Strong consistency (e.g., Session) - // Setting GLOBAL_STRONG on a non-Strong account should throw BadRequestException - CosmosAsyncClient client = null; - try { - client = createGatewayBuilder().buildAsyncClient(); - CosmosAsyncContainer container = getTestContainer(client); - - String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.GLOBAL_STRONG); + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.GLOBAL_STRONG); - Throwable thrown = catchThrowable(() -> - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block() - ); + Throwable thrown = catchThrowable(() -> + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block() + ); - assertThat(thrown).isNotNull(); - // The BadRequestException may be wrapped in a CosmosException - assertThat(thrown.getMessage()).contains("ReadConsistencyStrategy"); - logger.info("Expected error for GLOBAL_STRONG on non-Strong account: {}", thrown.getMessage()); - } finally { - safeClose(client); - } + assertThat(thrown).isNotNull(); + assertThat(thrown.getMessage()).contains("ReadConsistencyStrategy"); + logger.info("Expected error for GLOBAL_STRONG on non-Strong account: {}", thrown.getMessage()); } private CosmosClientBuilder createGatewayBuilder() { @@ -214,15 +208,10 @@ private CosmosClientBuilder createGatewayBuilder() { .consistencyLevel(ConsistencyLevel.SESSION); } - private CosmosAsyncContainer getTestContainer(CosmosAsyncClient client) { - // Uses the shared multi-partition container - return client.getDatabase("db1").getContainer("c2"); - } - private ObjectNode createDocument(String id) { ObjectNode doc = OBJECT_MAPPER.createObjectNode(); doc.put("id", id); - doc.put("partitionKey", id); + doc.put("pk", id); return doc; } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java index ace3c6d18955..ba86a47176ca 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java @@ -5,12 +5,14 @@ import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.CosmosAsyncClient; import com.azure.cosmos.CosmosAsyncContainer; +import com.azure.cosmos.CosmosAsyncDatabase; import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.CosmosDiagnostics; import com.azure.cosmos.CosmosDiagnosticsContext; import com.azure.cosmos.CosmosDiagnosticsRequestInfo; import com.azure.cosmos.FlakyTestRetryAnalyzer; import com.azure.cosmos.ReadConsistencyStrategy; +import com.azure.cosmos.models.CosmosContainerProperties; import com.azure.cosmos.models.CosmosItemRequestOptions; import com.azure.cosmos.models.CosmosItemResponse; import com.azure.cosmos.models.CosmosQueryRequestOptions; @@ -18,10 +20,13 @@ import com.azure.cosmos.models.PartitionKey; import com.azure.cosmos.models.SqlParameter; import com.azure.cosmos.models.SqlQuerySpec; +import com.azure.cosmos.models.ThroughputProperties; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import java.util.Arrays; @@ -32,184 +37,177 @@ /** * E2E tests for ReadConsistencyStrategy propagation through thin client (Gateway V2) mode. - * These tests verify that the RNTBD header 0x00F0 (ReadConsistencyStrategy) is correctly + * Verifies that the RNTBD header 0x00F0 (ReadConsistencyStrategy) is correctly * sent to the proxy and that the proxy applies the strategy server-side. * - * Requires a thin-client-enabled account. Run with test group "thinclient". + * Requires a thin-client-enabled account configured via TestConfigurations. + * Run with test group "thinclient". */ public class ThinClientReadConsistencyStrategyE2ETest { private static final Logger logger = LoggerFactory.getLogger(ThinClientReadConsistencyStrategyE2ETest.class); private static final String thinClientEndpointIndicator = ":10250/"; private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_readItem_withLatestCommitted() { - CosmosAsyncClient client = null; - try { - client = createThinClientBuilder().buildAsyncClient(); - CosmosAsyncContainer container = client.getDatabase("db1").getContainer("c2"); + private CosmosAsyncClient client; + private CosmosAsyncDatabase database; + private CosmosAsyncContainer container; + private String databaseId; + private String containerId; - String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + @BeforeClass(groups = {"thinclient"}) + public void beforeClass() { + client = createThinClientBuilder().buildAsyncClient(); - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + databaseId = "rcs-thinclient-test-" + UUID.randomUUID().toString().substring(0, 8); + containerId = "testcontainer"; - CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + client.createDatabaseIfNotExists(databaseId).block(); + database = client.getDatabase(databaseId); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); + CosmosContainerProperties containerProperties = new CosmosContainerProperties(containerId, "/pk"); + database.createContainerIfNotExists(containerProperties, ThroughputProperties.createManualThroughput(400)).block(); + container = database.getContainer(containerId); - CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); - assertThat(ctx.getEffectiveReadConsistencyStrategy()) - .isEqualTo(ReadConsistencyStrategy.LATEST_COMMITTED); - assertThinClientEndpointUsed(response.getDiagnostics()); - } finally { - safeClose(client); + logger.info("Created test database {} and container {}", databaseId, containerId); + } + + @AfterClass(groups = {"thinclient"}, alwaysRun = true) + public void afterClass() { + if (database != null) { + try { + database.delete().block(); + logger.info("Deleted test database {}", databaseId); + } catch (Exception e) { + logger.warn("Failed to delete test database", e); + } } + safeClose(client); } @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_queryItems_withLatestCommitted() { - CosmosAsyncClient client = null; - try { - client = createThinClientBuilder().buildAsyncClient(); - CosmosAsyncContainer container = client.getDatabase("db1").getContainer("c2"); + public void thinClient_readItem_withLatestCommitted() { + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); - String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() - .setPartitionKey(new PartitionKey(id)) - .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - SqlQuerySpec querySpec = new SqlQuerySpec("SELECT * FROM c WHERE c.id=@id"); - querySpec.setParameters(Arrays.asList(new SqlParameter("@id", id))); + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) + .isEqualTo(ReadConsistencyStrategy.LATEST_COMMITTED); + assertThinClientEndpointUsed(response.getDiagnostics()); + } - FeedResponse response = container - .queryItems(querySpec, queryOptions, ObjectNode.class) - .byPage() - .blockFirst(); + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_queryItems_withLatestCommitted() { + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); - assertThat(response).isNotNull(); - assertThat(response.getResults()).isNotNull(); - assertThinClientEndpointUsed(response.getCosmosDiagnostics()); - } finally { - safeClose(client); - } + CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() + .setPartitionKey(new PartitionKey(id)) + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + SqlQuerySpec querySpec = new SqlQuerySpec("SELECT * FROM c WHERE c.id=@id"); + querySpec.setParameters(Arrays.asList(new SqlParameter("@id", id))); + + FeedResponse response = container + .queryItems(querySpec, queryOptions, ObjectNode.class) + .byPage() + .blockFirst(); + + assertThat(response).isNotNull(); + assertThat(response.getResults()).isNotNull(); + assertThinClientEndpointUsed(response.getCosmosDiagnostics()); } @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) public void thinClient_readItem_withEventual() { - CosmosAsyncClient client = null; - try { - client = createThinClientBuilder().buildAsyncClient(); - CosmosAsyncContainer container = client.getDatabase("db1").getContainer("c2"); + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); - String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - - CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); - assertThat(ctx.getEffectiveReadConsistencyStrategy()) - .isEqualTo(ReadConsistencyStrategy.EVENTUAL); - } finally { - safeClose(client); - } + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) + .isEqualTo(ReadConsistencyStrategy.EVENTUAL); } @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) public void thinClient_readItem_withSession() { - CosmosAsyncClient client = null; - try { - client = createThinClientBuilder().buildAsyncClient(); - CosmosAsyncContainer container = client.getDatabase("db1").getContainer("c2"); - - String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); - - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.SESSION); + String id = UUID.randomUUID().toString(); + ObjectNode doc = createDocument(id); + container.createItem(doc, new PartitionKey(id), null).block(); - CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.SESSION); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); - assertThat(ctx.getEffectiveReadConsistencyStrategy()) - .isEqualTo(ReadConsistencyStrategy.SESSION); - } finally { - safeClose(client); - } + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) + .isEqualTo(ReadConsistencyStrategy.SESSION); } @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) public void thinClient_readItem_clientLevel_latestCommitted() { - CosmosAsyncClient client = null; + CosmosAsyncClient clientWithRcs = null; try { - client = createThinClientBuilder() + clientWithRcs = createThinClientBuilder() .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) .buildAsyncClient(); - CosmosAsyncContainer container = client.getDatabase("db1").getContainer("c2"); + CosmosAsyncContainer containerWithRcs = clientWithRcs.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + containerWithRcs.createItem(doc, new PartitionKey(id), null).block(); - // No request-level RCS — should inherit client-level LATEST_COMMITTED CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), ObjectNode.class).block(); + containerWithRcs.readItem(id, new PartitionKey(id), ObjectNode.class).block(); assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - - CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); - assertThat(ctx.getEffectiveReadConsistencyStrategy()) + assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) .isEqualTo(ReadConsistencyStrategy.LATEST_COMMITTED); } finally { - safeClose(client); + safeClose(clientWithRcs); } } @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) public void thinClient_writeItem_rcsIgnored() { - CosmosAsyncClient client = null; + CosmosAsyncClient clientWithRcs = null; try { - client = createThinClientBuilder() + clientWithRcs = createThinClientBuilder() .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) .buildAsyncClient(); - CosmosAsyncContainer container = client.getDatabase("db1").getContainer("c2"); + CosmosAsyncContainer containerWithRcs = clientWithRcs.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); ObjectNode doc = createDocument(id); - // RCS is set at client level but should be forced to DEFAULT for writes CosmosItemResponse response = - container.createItem(doc, new PartitionKey(id), null).block(); + containerWithRcs.createItem(doc, new PartitionKey(id), null).block(); assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(201); - - CosmosDiagnosticsContext ctx = response.getDiagnostics().getDiagnosticsContext(); - assertThat(ctx.getEffectiveReadConsistencyStrategy()) + assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) .isEqualTo(ReadConsistencyStrategy.DEFAULT); } finally { - safeClose(client); + safeClose(clientWithRcs); } } @@ -224,7 +222,7 @@ private CosmosClientBuilder createThinClientBuilder() { private ObjectNode createDocument(String id) { ObjectNode doc = OBJECT_MAPPER.createObjectNode(); doc.put("id", id); - doc.put("partitionKey", id); + doc.put("pk", id); return doc; } From 3f80dac2038c4e9a66b4cb0fd1b6af01dc9f0e6d Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 16 Apr 2026 00:56:10 -0400 Subject: [PATCH 06/46] Fix E2E tests for serverless accounts: remove throughput parameter (#48094) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java | 2 +- .../ThinClientReadConsistencyStrategyE2ETest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java index 04728a61c30b..11b2f443b4ec 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java @@ -56,7 +56,7 @@ public void beforeClass() { database = client.getDatabase(databaseId); CosmosContainerProperties containerProperties = new CosmosContainerProperties(containerId, "/pk"); - database.createContainerIfNotExists(containerProperties, ThroughputProperties.createManualThroughput(400)).block(); + database.createContainerIfNotExists(containerProperties).block(); container = database.getContainer(containerId); logger.info("Created test database {} and container {}", databaseId, containerId); diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java index ba86a47176ca..0f47692545ba 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java @@ -65,7 +65,7 @@ public void beforeClass() { database = client.getDatabase(databaseId); CosmosContainerProperties containerProperties = new CosmosContainerProperties(containerId, "/pk"); - database.createContainerIfNotExists(containerProperties, ThroughputProperties.createManualThroughput(400)).block(); + database.createContainerIfNotExists(containerProperties).block(); container = database.getContainer(containerId); logger.info("Created test database {} and container {}", databaseId, containerId); From 3fe50646dee5ea18f7fb433babc6548047123650 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 16 Apr 2026 01:17:14 -0400 Subject: [PATCH 07/46] Comprehensive E2E tests for ReadConsistencyStrategy across all request option types (#48094) Cover all 5 surfaces: ItemRequestOptions, QueryRequestOptions, ChangeFeedRequestOptions, ReadManyRequestOptions, CosmosClientBuilder (client-level). Plus write-ignored, GLOBAL_STRONG validation, and CL+RCS precedence tests. Tests use dynamic database/container creation, TestConfigurations, serverless-safe. Follows ThinClientTestBase pattern from PR #47759. Verified E2E: 21/21 PASS (10 thin client + 11 gateway V1) against swkrish-session (test4, Session, North Europe). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...GatewayReadConsistencyStrategyE2ETest.java | 215 ++++++++++++--- ...nClientReadConsistencyStrategyE2ETest.java | 258 +++++++++++++++--- 2 files changed, 396 insertions(+), 77 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java index 11b2f443b4ec..c10c052c3058 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java @@ -3,15 +3,18 @@ package com.azure.cosmos; import com.azure.cosmos.implementation.TestConfigurations; +import com.azure.cosmos.models.CosmosChangeFeedRequestOptions; import com.azure.cosmos.models.CosmosContainerProperties; +import com.azure.cosmos.models.CosmosItemIdentity; import com.azure.cosmos.models.CosmosItemRequestOptions; import com.azure.cosmos.models.CosmosItemResponse; import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.CosmosReadManyRequestOptions; +import com.azure.cosmos.models.FeedRange; import com.azure.cosmos.models.FeedResponse; import com.azure.cosmos.models.PartitionKey; import com.azure.cosmos.models.SqlParameter; import com.azure.cosmos.models.SqlQuerySpec; -import com.azure.cosmos.models.ThroughputProperties; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import org.slf4j.Logger; @@ -21,6 +24,7 @@ import org.testng.annotations.Test; import java.util.Arrays; +import java.util.List; import java.util.UUID; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; @@ -31,6 +35,13 @@ * Verifies that the HTTP header x-ms-cosmos-read-consistency-strategy is * correctly sent to the compute gateway and processed. * + * Covers all request option types that expose ReadConsistencyStrategy: + * - CosmosItemRequestOptions (point reads) + * - CosmosQueryRequestOptions (queries) + * - CosmosChangeFeedRequestOptions (change feed) + * - CosmosReadManyRequestOptions (read many) + * - CosmosClientBuilder (client-level default) + * * Uses TestConfigurations for account credentials. * Run with test group "fast". */ @@ -49,7 +60,7 @@ public class GatewayReadConsistencyStrategyE2ETest { public void beforeClass() { client = createGatewayBuilder().buildAsyncClient(); - databaseId = "rcs-gateway-test-" + UUID.randomUUID().toString().substring(0, 8); + databaseId = "rcs-gw-" + UUID.randomUUID().toString().substring(0, 8); containerId = "testcontainer"; client.createDatabaseIfNotExists(databaseId).block(); @@ -75,11 +86,12 @@ public void afterClass() { safeClose(client); } + // region ItemRequestOptions + @Test(groups = {"fast"}, timeOut = TIMEOUT) public void gateway_readItem_withLatestCommitted() { String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + createAndInsertDocument(id); CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); @@ -89,15 +101,49 @@ public void gateway_readItem_withLatestCommitted() { assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) - .isEqualTo(ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + } + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_readItem_withEventual() { + String id = UUID.randomUUID().toString(); + createAndInsertDocument(id); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); + + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.EVENTUAL); } + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_readItem_withSession() { + String id = UUID.randomUUID().toString(); + createAndInsertDocument(id); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.SESSION); + + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.SESSION); + } + + // endregion + + // region QueryRequestOptions + @Test(groups = {"fast"}, timeOut = TIMEOUT) public void gateway_queryItems_withLatestCommitted() { String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + createAndInsertDocument(id); CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() .setPartitionKey(new PartitionKey(id)) @@ -113,28 +159,70 @@ public void gateway_queryItems_withLatestCommitted() { assertThat(response).isNotNull(); assertThat(response.getResults()).isNotNull(); + assertEffectiveRcs(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); } + // endregion + + // region ChangeFeedRequestOptions + @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_readItem_withEventual() { - String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + public void gateway_changeFeed_withLatestCommitted() { + String pkValue = UUID.randomUUID().toString(); + createAndInsertDocument(pkValue); - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); + CosmosChangeFeedRequestOptions cfOptions = CosmosChangeFeedRequestOptions + .createForProcessingFromBeginning( + FeedRange.forLogicalPartition(new PartitionKey(pkValue))) + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + List> pages = container + .queryChangeFeed(cfOptions, ObjectNode.class) + .byPage() + .collectList() + .block(); + + assertThat(pages).isNotNull(); + assertThat(pages.isEmpty()).isFalse(); + + FeedResponse firstPage = pages.get(0); + assertEffectiveRcs(firstPage.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + } + + // endregion + + // region ReadManyRequestOptions + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_readMany_withLatestCommitted() { + String pkValue = UUID.randomUUID().toString(); + String id1 = UUID.randomUUID().toString(); + String id2 = UUID.randomUUID().toString(); + createAndInsertDocument(id1, pkValue); + createAndInsertDocument(id2, pkValue); + + List identities = Arrays.asList( + new CosmosItemIdentity(new PartitionKey(pkValue), id1), + new CosmosItemIdentity(new PartitionKey(pkValue), id2)); + + CosmosReadManyRequestOptions readManyOptions = new CosmosReadManyRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + FeedResponse response = + container.readMany(identities, readManyOptions, ObjectNode.class).block(); assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) - .isEqualTo(ReadConsistencyStrategy.EVENTUAL); + assertThat(response.getResults()).isNotNull(); + assertThat(response.getResults().size()).isEqualTo(2); + assertEffectiveRcs(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); } + // endregion + + // region Client-level RCS + @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_readItem_clientLevel_latestCommitted() { + public void gateway_clientLevel_latestCommitted_readItem() { CosmosAsyncClient clientWithRcs = null; try { clientWithRcs = createGatewayBuilder() @@ -143,21 +231,23 @@ public void gateway_readItem_clientLevel_latestCommitted() { CosmosAsyncContainer containerWithRcs = clientWithRcs.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - containerWithRcs.createItem(doc, new PartitionKey(id), null).block(); + createAndInsertDocument(containerWithRcs, id); CosmosItemResponse response = containerWithRcs.readItem(id, new PartitionKey(id), ObjectNode.class).block(); assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) - .isEqualTo(ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); } finally { safeClose(clientWithRcs); } } + // endregion + + // region Write operations — RCS forced to DEFAULT + @Test(groups = {"fast"}, timeOut = TIMEOUT) public void gateway_writeItem_rcsIgnored() { CosmosAsyncClient clientWithRcs = null; @@ -175,18 +265,20 @@ public void gateway_writeItem_rcsIgnored() { assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(201); - assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) - .isEqualTo(ReadConsistencyStrategy.DEFAULT); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.DEFAULT); } finally { safeClose(clientWithRcs); } } + // endregion + + // region Validation — GLOBAL_STRONG on Session account + @Test(groups = {"fast"}, timeOut = TIMEOUT) public void gateway_readItem_globalStrong_invalidAccount_throwsBadRequest() { String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + createAndInsertDocument(id); CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() .setReadConsistencyStrategy(ReadConsistencyStrategy.GLOBAL_STRONG); @@ -200,6 +292,38 @@ public void gateway_readItem_globalStrong_invalidAccount_throwsBadRequest() { logger.info("Expected error for GLOBAL_STRONG on non-Strong account: {}", thrown.getMessage()); } + // endregion + + // region Both ConsistencyLevel and RCS — RCS wins + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_bothConsistencyLevelAndRcs_rcsWins() { + CosmosAsyncClient clientWithBoth = null; + try { + clientWithBoth = createGatewayBuilder() + .consistencyLevel(ConsistencyLevel.EVENTUAL) + .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) + .buildAsyncClient(); + CosmosAsyncContainer containerWithBoth = clientWithBoth.getDatabase(databaseId).getContainer(containerId); + + String id = UUID.randomUUID().toString(); + createAndInsertDocument(containerWithBoth, id); + + CosmosItemResponse response = + containerWithBoth.readItem(id, new PartitionKey(id), ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + } finally { + safeClose(clientWithBoth); + } + } + + // endregion + + // region Helpers + private CosmosClientBuilder createGatewayBuilder() { return new CosmosClientBuilder() .endpoint(TestConfigurations.HOST) @@ -209,19 +333,46 @@ private CosmosClientBuilder createGatewayBuilder() { } private ObjectNode createDocument(String id) { + return createDocument(id, id); + } + + private ObjectNode createDocument(String id, String pk) { ObjectNode doc = OBJECT_MAPPER.createObjectNode(); doc.put("id", id); - doc.put("pk", id); + doc.put("pk", pk); return doc; } - private static void safeClose(CosmosAsyncClient client) { - if (client != null) { + private void createAndInsertDocument(String id) { + createAndInsertDocument(id, id); + } + + private void createAndInsertDocument(String id, String pk) { + ObjectNode doc = createDocument(id, pk); + container.createItem(doc, new PartitionKey(pk), null).block(); + } + + private void createAndInsertDocument(CosmosAsyncContainer targetContainer, String id) { + ObjectNode doc = createDocument(id); + targetContainer.createItem(doc, new PartitionKey(id), null).block(); + } + + private static void assertEffectiveRcs(CosmosDiagnostics diagnostics, ReadConsistencyStrategy expected) { + assertThat(diagnostics).isNotNull(); + assertThat(diagnostics.getDiagnosticsContext()).isNotNull(); + assertThat(diagnostics.getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) + .isEqualTo(expected); + } + + private static void safeClose(CosmosAsyncClient clientToClose) { + if (clientToClose != null) { try { - client.close(); + clientToClose.close(); } catch (Exception e) { logger.warn("Failed to close client", e); } } } + + // endregion } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java index 0f47692545ba..0dc97f1bc688 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java @@ -12,15 +12,18 @@ import com.azure.cosmos.CosmosDiagnosticsRequestInfo; import com.azure.cosmos.FlakyTestRetryAnalyzer; import com.azure.cosmos.ReadConsistencyStrategy; +import com.azure.cosmos.models.CosmosChangeFeedRequestOptions; import com.azure.cosmos.models.CosmosContainerProperties; +import com.azure.cosmos.models.CosmosItemIdentity; import com.azure.cosmos.models.CosmosItemRequestOptions; import com.azure.cosmos.models.CosmosItemResponse; import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.CosmosReadManyRequestOptions; +import com.azure.cosmos.models.FeedRange; import com.azure.cosmos.models.FeedResponse; import com.azure.cosmos.models.PartitionKey; import com.azure.cosmos.models.SqlParameter; import com.azure.cosmos.models.SqlQuerySpec; -import com.azure.cosmos.models.ThroughputProperties; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import org.slf4j.Logger; @@ -31,6 +34,7 @@ import java.util.Arrays; import java.util.Collection; +import java.util.List; import java.util.UUID; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; @@ -40,12 +44,19 @@ * Verifies that the RNTBD header 0x00F0 (ReadConsistencyStrategy) is correctly * sent to the proxy and that the proxy applies the strategy server-side. * + * Covers all request option types that expose ReadConsistencyStrategy: + * - CosmosItemRequestOptions (point reads) + * - CosmosQueryRequestOptions (queries) + * - CosmosChangeFeedRequestOptions (change feed) + * - CosmosReadManyRequestOptions (read many) + * - CosmosClientBuilder (client-level default) + * * Requires a thin-client-enabled account configured via TestConfigurations. * Run with test group "thinclient". */ public class ThinClientReadConsistencyStrategyE2ETest { private static final Logger logger = LoggerFactory.getLogger(ThinClientReadConsistencyStrategyE2ETest.class); - private static final String thinClientEndpointIndicator = ":10250/"; + private static final String THIN_CLIENT_ENDPOINT_INDICATOR = ":10250/"; private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); private CosmosAsyncClient client; @@ -58,7 +69,7 @@ public class ThinClientReadConsistencyStrategyE2ETest { public void beforeClass() { client = createThinClientBuilder().buildAsyncClient(); - databaseId = "rcs-thinclient-test-" + UUID.randomUUID().toString().substring(0, 8); + databaseId = "rcs-tc-" + UUID.randomUUID().toString().substring(0, 8); containerId = "testcontainer"; client.createDatabaseIfNotExists(databaseId).block(); @@ -84,11 +95,12 @@ public void afterClass() { safeClose(client); } + // region ItemRequestOptions + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) public void thinClient_readItem_withLatestCommitted() { String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + createAndInsertDocument(id); CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); @@ -98,16 +110,52 @@ public void thinClient_readItem_withLatestCommitted() { assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) - .isEqualTo(ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertThinClientEndpointUsed(response.getDiagnostics()); + } + + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_readItem_withEventual() { + String id = UUID.randomUUID().toString(); + createAndInsertDocument(id); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); + + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.EVENTUAL); + assertThinClientEndpointUsed(response.getDiagnostics()); + } + + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_readItem_withSession() { + String id = UUID.randomUUID().toString(); + createAndInsertDocument(id); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.SESSION); + + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.SESSION); assertThinClientEndpointUsed(response.getDiagnostics()); } + // endregion + + // region QueryRequestOptions + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) public void thinClient_queryItems_withLatestCommitted() { String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + createAndInsertDocument(id); CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() .setPartitionKey(new PartitionKey(id)) @@ -123,47 +171,73 @@ public void thinClient_queryItems_withLatestCommitted() { assertThat(response).isNotNull(); assertThat(response.getResults()).isNotNull(); + assertEffectiveRcs(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); assertThinClientEndpointUsed(response.getCosmosDiagnostics()); } + // endregion + + // region ChangeFeedRequestOptions + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_readItem_withEventual() { - String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + public void thinClient_changeFeed_withLatestCommitted() { + String pkValue = UUID.randomUUID().toString(); + createAndInsertDocument(pkValue); - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); + CosmosChangeFeedRequestOptions cfOptions = CosmosChangeFeedRequestOptions + .createForProcessingFromBeginning( + FeedRange.forLogicalPartition(new PartitionKey(pkValue))) + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + List> pages = container + .queryChangeFeed(cfOptions, ObjectNode.class) + .byPage() + .collectList() + .block(); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) - .isEqualTo(ReadConsistencyStrategy.EVENTUAL); + assertThat(pages).isNotNull(); + assertThat(pages.isEmpty()).isFalse(); + + FeedResponse firstPage = pages.get(0); + assertEffectiveRcs(firstPage.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertThinClientEndpointUsed(firstPage.getCosmosDiagnostics()); } - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_readItem_withSession() { - String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - container.createItem(doc, new PartitionKey(id), null).block(); + // endregion - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.SESSION); + // region ReadManyRequestOptions - CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_readMany_withLatestCommitted() { + String pkValue = UUID.randomUUID().toString(); + String id1 = UUID.randomUUID().toString(); + String id2 = UUID.randomUUID().toString(); + createAndInsertDocument(id1, pkValue); + createAndInsertDocument(id2, pkValue); + + List identities = Arrays.asList( + new CosmosItemIdentity(new PartitionKey(pkValue), id1), + new CosmosItemIdentity(new PartitionKey(pkValue), id2)); + + CosmosReadManyRequestOptions readManyOptions = new CosmosReadManyRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + FeedResponse response = + container.readMany(identities, readManyOptions, ObjectNode.class).block(); assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) - .isEqualTo(ReadConsistencyStrategy.SESSION); + assertThat(response.getResults()).isNotNull(); + assertThat(response.getResults().size()).isEqualTo(2); + assertEffectiveRcs(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertThinClientEndpointUsed(response.getCosmosDiagnostics()); } + // endregion + + // region Client-level RCS + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_readItem_clientLevel_latestCommitted() { + public void thinClient_clientLevel_latestCommitted_readItem() { CosmosAsyncClient clientWithRcs = null; try { clientWithRcs = createThinClientBuilder() @@ -172,21 +246,56 @@ public void thinClient_readItem_clientLevel_latestCommitted() { CosmosAsyncContainer containerWithRcs = clientWithRcs.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - containerWithRcs.createItem(doc, new PartitionKey(id), null).block(); + createAndInsertDocument(containerWithRcs, id); CosmosItemResponse response = containerWithRcs.readItem(id, new PartitionKey(id), ObjectNode.class).block(); assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) - .isEqualTo(ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertThinClientEndpointUsed(response.getDiagnostics()); + } finally { + safeClose(clientWithRcs); + } + } + + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_clientLevel_latestCommitted_query() { + CosmosAsyncClient clientWithRcs = null; + try { + clientWithRcs = createThinClientBuilder() + .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) + .buildAsyncClient(); + CosmosAsyncContainer containerWithRcs = clientWithRcs.getDatabase(databaseId).getContainer(containerId); + + String id = UUID.randomUUID().toString(); + createAndInsertDocument(containerWithRcs, id); + + CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() + .setPartitionKey(new PartitionKey(id)); + + SqlQuerySpec querySpec = new SqlQuerySpec("SELECT * FROM c WHERE c.id=@id"); + querySpec.setParameters(Arrays.asList(new SqlParameter("@id", id))); + + FeedResponse response = containerWithRcs + .queryItems(querySpec, queryOptions, ObjectNode.class) + .byPage() + .blockFirst(); + + assertThat(response).isNotNull(); + assertThat(response.getResults()).isNotNull(); + assertEffectiveRcs(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertThinClientEndpointUsed(response.getCosmosDiagnostics()); } finally { safeClose(clientWithRcs); } } + // endregion + + // region Write operations — RCS forced to DEFAULT + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) public void thinClient_writeItem_rcsIgnored() { CosmosAsyncClient clientWithRcs = null; @@ -204,13 +313,45 @@ public void thinClient_writeItem_rcsIgnored() { assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(201); - assertThat(response.getDiagnostics().getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) - .isEqualTo(ReadConsistencyStrategy.DEFAULT); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.DEFAULT); } finally { safeClose(clientWithRcs); } } + // endregion + + // region Both ConsistencyLevel and RCS — RCS wins + + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_bothConsistencyLevelAndRcs_rcsWins() { + CosmosAsyncClient clientWithBoth = null; + try { + clientWithBoth = createThinClientBuilder() + .consistencyLevel(ConsistencyLevel.EVENTUAL) + .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) + .buildAsyncClient(); + CosmosAsyncContainer containerWithBoth = clientWithBoth.getDatabase(databaseId).getContainer(containerId); + + String id = UUID.randomUUID().toString(); + createAndInsertDocument(containerWithBoth, id); + + CosmosItemResponse response = + containerWithBoth.readItem(id, new PartitionKey(id), ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertThinClientEndpointUsed(response.getDiagnostics()); + } finally { + safeClose(clientWithBoth); + } + } + + // endregion + + // region Helpers + private CosmosClientBuilder createThinClientBuilder() { return new CosmosClientBuilder() .endpoint(TestConfigurations.HOST) @@ -220,12 +361,37 @@ private CosmosClientBuilder createThinClientBuilder() { } private ObjectNode createDocument(String id) { + return createDocument(id, id); + } + + private ObjectNode createDocument(String id, String pk) { ObjectNode doc = OBJECT_MAPPER.createObjectNode(); doc.put("id", id); - doc.put("pk", id); + doc.put("pk", pk); return doc; } + private void createAndInsertDocument(String id) { + createAndInsertDocument(id, id); + } + + private void createAndInsertDocument(String id, String pk) { + ObjectNode doc = createDocument(id, pk); + container.createItem(doc, new PartitionKey(pk), null).block(); + } + + private void createAndInsertDocument(CosmosAsyncContainer targetContainer, String id) { + ObjectNode doc = createDocument(id); + targetContainer.createItem(doc, new PartitionKey(id), null).block(); + } + + private static void assertEffectiveRcs(CosmosDiagnostics diagnostics, ReadConsistencyStrategy expected) { + assertThat(diagnostics).isNotNull(); + assertThat(diagnostics.getDiagnosticsContext()).isNotNull(); + assertThat(diagnostics.getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) + .isEqualTo(expected); + } + private static void assertThinClientEndpointUsed(CosmosDiagnostics diagnostics) { assertThat(diagnostics).isNotNull(); CosmosDiagnosticsContext ctx = diagnostics.getDiagnosticsContext(); @@ -237,20 +403,22 @@ private static void assertThinClientEndpointUsed(CosmosDiagnostics diagnostics) for (CosmosDiagnosticsRequestInfo requestInfo : requests) { logger.info("Endpoint: {}, RequestType: {}", requestInfo.getEndpoint(), requestInfo.getRequestType()); - if (requestInfo.getEndpoint().contains(thinClientEndpointIndicator)) { + if (requestInfo.getEndpoint().contains(THIN_CLIENT_ENDPOINT_INDICATOR)) { return; } } org.assertj.core.api.Assertions.fail("Expected at least one request to use thin client endpoint (:10250/)"); } - private static void safeClose(CosmosAsyncClient client) { - if (client != null) { + private static void safeClose(CosmosAsyncClient clientToClose) { + if (clientToClose != null) { try { - client.close(); + clientToClose.close(); } catch (Exception e) { logger.warn("Failed to close client", e); } } } + + // endregion } From adc17bd59e6afc7681976ec812418d98165a003f Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 16 Apr 2026 11:17:53 -0400 Subject: [PATCH 08/46] Fix test-resources.json: bump Cosmos DB API version to 2023-04-15 The Cosmos DB RP now rejects API version 2022-08-15 for accounts with EnableNoSQLVectorSearch capability, requiring 2023-04-15 or later. Error: 'Please use api version 2022-02-15-preview or 2023-04-15 or later' ActivityId: 3e0f30d8-548a-408f-9827-09c3b81a7166 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- sdk/cosmos/test-resources.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/cosmos/test-resources.json b/sdk/cosmos/test-resources.json index 764c3e49b5c8..81214cfdfb95 100644 --- a/sdk/cosmos/test-resources.json +++ b/sdk/cosmos/test-resources.json @@ -33,7 +33,7 @@ } }, "variables": { - "apiVersion": "2022-08-15", + "apiVersion": "2023-04-15", "accountName": "[toLower(parameters('baseName'))]", "newAccountName": "[toLower(concat(parameters('baseName'), '2'))]", "resourceId": "[resourceId('Microsoft.DocumentDB/databaseAccounts', variables('accountName'))]", From 8e262cb4d32de1f38a4e2194c8d24119be450f99 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 16 Apr 2026 12:05:49 -0400 Subject: [PATCH 09/46] Test: revert to 2022-08-15 with EnableNoSQLVectorSearch removed Verifying that the API version rejection was caused by EnableNoSQLVectorSearch. This commit will be reverted after pipeline verification. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- sdk/cosmos/test-resources.json | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/sdk/cosmos/test-resources.json b/sdk/cosmos/test-resources.json index 81214cfdfb95..8837a5165a37 100644 --- a/sdk/cosmos/test-resources.json +++ b/sdk/cosmos/test-resources.json @@ -33,7 +33,7 @@ } }, "variables": { - "apiVersion": "2023-04-15", + "apiVersion": "2022-08-15", "accountName": "[toLower(parameters('baseName'))]", "newAccountName": "[toLower(concat(parameters('baseName'), '2'))]", "resourceId": "[resourceId('Microsoft.DocumentDB/databaseAccounts', variables('accountName'))]", @@ -86,11 +86,7 @@ "maxStalenessPrefix": 100 }, "locations": "[variables('locationsConfiguration')]", - "capabilities": [ - { - "name": "EnableNoSQLVectorSearch" - } - ], + "capabilities": [], "ipRules": [] } }, @@ -117,11 +113,7 @@ "maxStalenessPrefix": 100 }, "locations": "[variables('locationsConfiguration')]", - "capabilities": [ - { - "name": "EnableNoSQLVectorSearch" - } - ], + "capabilities": [], "ipRules": [] } } From 6e84b990f33e058da698e4eb54576b1dffa8b9ed Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 16 Apr 2026 12:30:32 -0400 Subject: [PATCH 10/46] Fix test-resources.json: bump API version to 2023-04-15 for EnableNoSQLVectorSearch (#48094) Cosmos DB RP now requires API version 2023-04-15+ for accounts with EnableNoSQLVectorSearch capability. Confirmed by testing: - 2022-08-15 + EnableNoSQLVectorSearch = 400 BadRequest - 2022-08-15 without EnableNoSQLVectorSearch = passes - 2023-04-15 + EnableNoSQLVectorSearch = passes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- sdk/cosmos/test-resources.json | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sdk/cosmos/test-resources.json b/sdk/cosmos/test-resources.json index 8837a5165a37..81214cfdfb95 100644 --- a/sdk/cosmos/test-resources.json +++ b/sdk/cosmos/test-resources.json @@ -33,7 +33,7 @@ } }, "variables": { - "apiVersion": "2022-08-15", + "apiVersion": "2023-04-15", "accountName": "[toLower(parameters('baseName'))]", "newAccountName": "[toLower(concat(parameters('baseName'), '2'))]", "resourceId": "[resourceId('Microsoft.DocumentDB/databaseAccounts', variables('accountName'))]", @@ -86,7 +86,11 @@ "maxStalenessPrefix": 100 }, "locations": "[variables('locationsConfiguration')]", - "capabilities": [], + "capabilities": [ + { + "name": "EnableNoSQLVectorSearch" + } + ], "ipRules": [] } }, @@ -113,7 +117,11 @@ "maxStalenessPrefix": 100 }, "locations": "[variables('locationsConfiguration')]", - "capabilities": [], + "capabilities": [ + { + "name": "EnableNoSQLVectorSearch" + } + ], "ipRules": [] } } From 7991337acb9b8bcb02043480754f2e978b0086f5 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 16 Apr 2026 13:31:46 -0400 Subject: [PATCH 11/46] Test: re-verify 2022-08-15 + EnableNoSQLVectorSearch (expect 400) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- sdk/cosmos/test-resources.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/cosmos/test-resources.json b/sdk/cosmos/test-resources.json index 81214cfdfb95..764c3e49b5c8 100644 --- a/sdk/cosmos/test-resources.json +++ b/sdk/cosmos/test-resources.json @@ -33,7 +33,7 @@ } }, "variables": { - "apiVersion": "2023-04-15", + "apiVersion": "2022-08-15", "accountName": "[toLower(parameters('baseName'))]", "newAccountName": "[toLower(concat(parameters('baseName'), '2'))]", "resourceId": "[resourceId('Microsoft.DocumentDB/databaseAccounts', variables('accountName'))]", From e00f5bb55a865380586e8d4b15d2e1a28c187abb Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 16 Apr 2026 19:34:50 -0400 Subject: [PATCH 12/46] Centralize consistency flag contention resolution in RxGatewayStoreModel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add resolveEffectiveConsistencyHeaders() in RxGatewayStoreModel that strips x-ms-consistency-level when ReadConsistencyStrategy wins. Called before wrapInHttpRequest — affects both GW V1 (HTTP) and GW V2/ThinClientStoreModel (RNTBD). - Fix contention bug in RxDocumentClientImpl.getRequestHeaders(): options.getConsistencyLevel() no longer re-adds CL header when RCS is already present (Option A guard). - Rules: request-level RCS > client-level RCS; RCS > ConsistencyLevel. Only one consistency header survives on the wire. - 10 unit tests (ConsistencyFlagContentionTest): both-set, request-ctx priority, header-level, DEFAULT transparent, null, idempotency. - 4 new E2E tests: request-level contention and request-level RCS override for both GW V1 and GW V2 paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...GatewayReadConsistencyStrategyE2ETest.java | 46 ++++ .../ConsistencyFlagContentionTest.java | 217 ++++++++++++++++++ ...nClientReadConsistencyStrategyE2ETest.java | 48 ++++ .../implementation/RxDocumentClientImpl.java | 5 +- .../implementation/RxGatewayStoreModel.java | 55 +++++ 5 files changed, 370 insertions(+), 1 deletion(-) create mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java index c10c052c3058..5a6fb0fdbcaf 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java @@ -320,6 +320,52 @@ public void gateway_bothConsistencyLevelAndRcs_rcsWins() { } } + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_requestLevel_bothClAndRcs_rcsWins() { + // Request-level contention: options set both ConsistencyLevel and RCS. + // RCS should win — gateway must not reject with dual-header error. + String id = UUID.randomUUID().toString(); + createAndInsertDocument(id); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setConsistencyLevel(ConsistencyLevel.EVENTUAL) + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + } + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_requestLevelRcs_overridesClientLevelRcs() { + // Request-level RCS should override client-level RCS. + CosmosAsyncClient clientWithClientRcs = null; + try { + clientWithClientRcs = createGatewayBuilder() + .readConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL) + .buildAsyncClient(); + CosmosAsyncContainer containerWithRcs = clientWithClientRcs.getDatabase(databaseId).getContainer(containerId); + + String id = UUID.randomUUID().toString(); + createAndInsertDocument(containerWithRcs, id); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + CosmosItemResponse response = + containerWithRcs.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + } finally { + safeClose(clientWithClientRcs); + } + } + // endregion // region Helpers diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java new file mode 100644 index 000000000000..b76248009469 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos.implementation; + +import com.azure.cosmos.ConsistencyLevel; +import com.azure.cosmos.ReadConsistencyStrategy; +import org.testng.annotations.Test; + +import java.util.HashMap; +import java.util.Map; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Unit tests for consistency flag contention resolution in RxGatewayStoreModel. + * + * Contention rules: + * 1. Request-level RCS (requestContext) > client-level RCS (header) + * 2. RCS > ConsistencyLevel — strip CL when non-DEFAULT RCS is effective + * 3. DEFAULT RCS is transparent — CL stays + */ +public class ConsistencyFlagContentionTest { + + // region getRequestHeaders — Option A guard + + @Test(groups = "unit") + public void getRequestHeaders_bothRcsAndCl_onlyRcsSurvives() { + // Simulates the contention: request options set both RCS and CL. + // After getRequestHeaders, RCS should be present and CL should be absent. + Map headers = new HashMap<>(); + headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, + ReadConsistencyStrategy.LATEST_COMMITTED.toString()); + // Simulate the Option A guard: CL should NOT be added when RCS is present + if (!headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) { + headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.EVENTUAL.toString()); + } + + assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)).isTrue(); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); + } + + @Test(groups = "unit") + public void getRequestHeaders_onlyCl_clSurvives() { + // When no RCS is set, CL should be set normally. + Map headers = new HashMap<>(); + if (!headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) { + headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.SESSION.toString()); + } + + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isTrue(); + assertThat(headers.get(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isEqualTo("Session"); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)).isFalse(); + } + + @Test(groups = "unit") + public void getRequestHeaders_onlyRcs_rcsSurvives() { + // When only RCS is set (no CL), RCS should survive. + Map headers = new HashMap<>(); + headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, + ReadConsistencyStrategy.EVENTUAL.toString()); + + assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)).isTrue(); + assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)).isEqualTo("Eventual"); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); + } + + // endregion + + // region resolveEffectiveConsistencyHeaders — centralized resolution + + @Test(groups = "unit") + public void resolve_requestContextRcs_stripsCl() { + // When requestContext has non-DEFAULT RCS and headers have CL, CL should be stripped. + Map headers = new HashMap<>(); + headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.SESSION.toString()); + + DocumentServiceRequestContext ctx = new DocumentServiceRequestContext(); + ctx.readConsistencyStrategy = ReadConsistencyStrategy.LATEST_COMMITTED; + + simulateResolve(headers, ctx); + + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); + assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .isEqualTo("LatestCommitted"); + } + + @Test(groups = "unit") + public void resolve_headerRcs_stripsCl() { + // When header has non-DEFAULT RCS and also CL, CL should be stripped. + Map headers = new HashMap<>(); + headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.SESSION.toString()); + headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, + ReadConsistencyStrategy.EVENTUAL.toString()); + + simulateResolve(headers, new DocumentServiceRequestContext()); + + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); + assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .isEqualTo("Eventual"); + } + + @Test(groups = "unit") + public void resolve_requestContextRcs_overridesHeaderRcs() { + // Request-level RCS (requestContext) takes priority over header-level (client-level) RCS. + Map headers = new HashMap<>(); + headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, + ReadConsistencyStrategy.EVENTUAL.toString()); + headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.EVENTUAL.toString()); + + DocumentServiceRequestContext ctx = new DocumentServiceRequestContext(); + ctx.readConsistencyStrategy = ReadConsistencyStrategy.SESSION; + + simulateResolve(headers, ctx); + + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); + assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .isEqualTo("Session"); + } + + @Test(groups = "unit") + public void resolve_defaultRcs_clSurvives() { + // DEFAULT RCS is transparent — CL should remain. + Map headers = new HashMap<>(); + headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.BOUNDED_STALENESS.toString()); + + DocumentServiceRequestContext ctx = new DocumentServiceRequestContext(); + ctx.readConsistencyStrategy = ReadConsistencyStrategy.DEFAULT; + + simulateResolve(headers, ctx); + + assertThat(headers.get(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) + .isEqualTo("BoundedStaleness"); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)).isFalse(); + } + + @Test(groups = "unit") + public void resolve_nullRcs_clSurvives() { + // When no RCS is set at all, CL should remain. + Map headers = new HashMap<>(); + headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.STRONG.toString()); + + DocumentServiceRequestContext ctx = new DocumentServiceRequestContext(); + // readConsistencyStrategy is null by default + + simulateResolve(headers, ctx); + + assertThat(headers.get(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) + .isEqualTo("Strong"); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)).isFalse(); + } + + @Test(groups = "unit") + public void resolve_noHeaders_noOp() { + // When neither CL nor RCS is set, resolution is a no-op. + Map headers = new HashMap<>(); + + simulateResolve(headers, new DocumentServiceRequestContext()); + + assertThat(headers).isEmpty(); + } + + @Test(groups = "unit") + public void resolve_idempotent_multipleInvocations() { + // Resolution should be idempotent — multiple calls produce the same result. + // This validates safety for shared header maps across availability strategy clones. + Map headers = new HashMap<>(); + headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.SESSION.toString()); + headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, + ReadConsistencyStrategy.LATEST_COMMITTED.toString()); + + DocumentServiceRequestContext ctx = new DocumentServiceRequestContext(); + + simulateResolve(headers, ctx); + simulateResolve(headers, ctx); + simulateResolve(headers, ctx); + + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); + assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .isEqualTo("LatestCommitted"); + } + + // endregion + + /** + * Simulates the resolveEffectiveConsistencyHeaders logic from RxGatewayStoreModel. + * This mirrors the private method exactly to enable unit testing without constructing + * the full gateway store model infrastructure. + */ + private static void simulateResolve(Map headers, DocumentServiceRequestContext ctx) { + ReadConsistencyStrategy effectiveRcs = null; + + if (ctx != null + && ctx.readConsistencyStrategy != null + && ctx.readConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { + effectiveRcs = ctx.readConsistencyStrategy; + } + + if (effectiveRcs == null) { + String rcsHeaderValue = headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY); + if (rcsHeaderValue != null && !rcsHeaderValue.isEmpty()) { + effectiveRcs = ReadConsistencyStrategy.DEFAULT; + for (ReadConsistencyStrategy candidate : ReadConsistencyStrategy.values()) { + if (candidate != ReadConsistencyStrategy.DEFAULT + && candidate.toString().equals(rcsHeaderValue)) { + effectiveRcs = candidate; + break; + } + } + } + } + + if (effectiveRcs != null && effectiveRcs != ReadConsistencyStrategy.DEFAULT) { + headers.remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); + headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, effectiveRcs.toString()); + } + } +} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java index 0dc97f1bc688..c8216214b9cc 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java @@ -348,6 +348,54 @@ public void thinClient_bothConsistencyLevelAndRcs_rcsWins() { } } + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_requestLevel_bothClAndRcs_rcsWins() { + // Request-level contention: options set both ConsistencyLevel and RCS. + // RCS should win — proxy must not reject with dual-header error. + String id = UUID.randomUUID().toString(); + createAndInsertDocument(id); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setConsistencyLevel(ConsistencyLevel.EVENTUAL) + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + CosmosItemResponse response = + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertThinClientEndpointUsed(response.getDiagnostics()); + } + + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_requestLevelRcs_overridesClientLevelRcs() { + // Request-level RCS should override client-level RCS. + CosmosAsyncClient clientWithClientRcs = null; + try { + clientWithClientRcs = createThinClientBuilder() + .readConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL) + .buildAsyncClient(); + CosmosAsyncContainer containerWithRcs = clientWithClientRcs.getDatabase(databaseId).getContainer(containerId); + + String id = UUID.randomUUID().toString(); + createAndInsertDocument(containerWithRcs, id); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + CosmosItemResponse response = + containerWithRcs.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertThinClientEndpointUsed(response.getDiagnostics()); + } finally { + safeClose(clientWithClientRcs); + } + } + // endregion // region Helpers diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java index e6adc1567b4e..71dff3e415ec 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java @@ -2022,7 +2022,10 @@ private Map getRequestHeaders(RequestOptions options, ResourceTy headers.remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); } - if (options.getConsistencyLevel() != null) { + if (options.getConsistencyLevel() != null + && !headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) { + // Only set ConsistencyLevel when ReadConsistencyStrategy is NOT already present. + // RCS takes precedence — setting both causes gateway rejection. headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, options.getConsistencyLevel().toString()); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java index 0e341c7b77db..608c4944a94e 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java @@ -320,9 +320,64 @@ public Mono performRequestInternal(RxDocumentServiceR }); } + /** + * Resolves contention between ConsistencyLevel and ReadConsistencyStrategy headers. + * Gateways (V1 HTTP and V2 RNTBD) reject requests carrying both headers. + * + * Rules: + * 1. Request-level RCS (requestContext) > client-level RCS (header) + * 2. RCS > ConsistencyLevel — strip CL when non-DEFAULT RCS is effective + * 3. DEFAULT RCS is transparent — CL stays + * + * After this method, the request headers contain at most ONE of the two consistency headers. + * GW V1 serializes the surviving header as HTTP; GW V2 (ThinClientStoreModel) encodes it as RNTBD. + * + * Thread safety: availability-strategy clones share the same header map (shallow copy). + * The mutation here (remove CL when RCS present) is idempotent — concurrent clones + * performing the same removal is safe. + */ + private void resolveEffectiveConsistencyHeaders(RxDocumentServiceRequest request) { + Map headers = request.getHeaders(); + + // Determine effective RCS: requestContext (request-level) takes priority over header (client-level) + ReadConsistencyStrategy effectiveRcs = null; + if (request.requestContext != null + && request.requestContext.readConsistencyStrategy != null + && request.requestContext.readConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { + effectiveRcs = request.requestContext.readConsistencyStrategy; + } + + if (effectiveRcs == null) { + String rcsHeaderValue = headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY); + if (!Strings.isNullOrEmpty(rcsHeaderValue)) { + effectiveRcs = ReadConsistencyStrategy.DEFAULT; // non-null marker; actual value is in header + // Re-parse only to check non-DEFAULT — the header string is authoritative for serialization + for (ReadConsistencyStrategy candidate : ReadConsistencyStrategy.values()) { + if (candidate != ReadConsistencyStrategy.DEFAULT + && candidate.toString().equals(rcsHeaderValue)) { + effectiveRcs = candidate; + break; + } + } + } + } + + if (effectiveRcs != null && effectiveRcs != ReadConsistencyStrategy.DEFAULT) { + // RCS wins — strip ConsistencyLevel to prevent dual-header rejection + headers.remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); + // Ensure the RCS header is set (requestContext-level may not have been written to headers yet) + headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, effectiveRcs.toString()); + } + } + private Mono performRequestInternalCore(RxDocumentServiceRequest request, URI requestUri) { try { + // Canonicalize consistency headers before wire serialization. + // Both GW V1 (HTTP) and GW V2 (RNTBD via ThinClientStoreModel) read from + // request.getHeaders() — this ensures only the winning header reaches the wire. + resolveEffectiveConsistencyHeaders(request); + HttpRequest httpRequest = request .getEffectiveHttpTransportSerializer(this) .wrapInHttpRequest(request, requestUri); From 6aa54a58957452b858d791712de7818ca26fa71c Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Tue, 21 Apr 2026 17:57:26 -0400 Subject: [PATCH 13/46] Add spy-wire tests to verify ReadConsistencyStrategy headers on the wire (#48094) Verify actual HTTP headers sent by the SDK using the SpyClientUnderTest (Mockito spy on HttpClient) pattern from RequestHeadersSpyWireTest. 5 new tests: - Request-level RCS: x-ms-cosmos-read-consistency-strategy on wire, CL stripped - Client-level RCS: same header verification via builder-level config - Both RCS + CL: RCS wins, CL stripped (contention resolution) - DEFAULT RCS: no RCS header emitted (transparent) - Write with client RCS: no RCS header on write operations Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../RequestHeadersSpyWireTest.java | 163 ++++++++++++++++++ 1 file changed, 163 insertions(+) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RequestHeadersSpyWireTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RequestHeadersSpyWireTest.java index 89ce7720cb55..7b58b335e43e 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RequestHeadersSpyWireTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RequestHeadersSpyWireTest.java @@ -3,7 +3,9 @@ package com.azure.cosmos.implementation; import com.azure.cosmos.rx.TestSuiteBase; +import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.CosmosItemSerializer; +import com.azure.cosmos.ReadConsistencyStrategy; import com.azure.cosmos.implementation.AsyncDocumentClient.Builder; import com.azure.cosmos.implementation.http.HttpRequest; import com.azure.cosmos.models.CosmosItemRequestOptions; @@ -367,6 +369,167 @@ public void readItemWithDedicatedGatewayShardKeyHeader() { } } + // region ReadConsistencyStrategy — verify headers on the wire + + @Test(groups = { "fast" }, timeOut = TIMEOUT) + public void readItem_withRequestLevelRcs_headerOnWire() { + String documentLink = getDocumentLink(); + + CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); + cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); + + client.clearCapturedRequests(); + RequestOptions requestOptions = itemOptionsAccessor.toRequestOptions(cosmosItemRequestOptions); + requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); + client.readDocument(documentLink, requestOptions).block(); + + List requests = client.getCapturedRequests(); + assertThat(requests).isNotEmpty(); + + HttpRequest docRequest = findDocumentRequest(requests, documentLink); + assertThat(docRequest).as("Expected a document read request").isNotNull(); + + Map headers = docRequest.headers().toMap(); + assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .isEqualTo("LatestCommitted"); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) + .as("ConsistencyLevel header should be stripped when RCS is set") + .isFalse(); + } + + @Test(groups = { "fast" }, timeOut = TIMEOUT) + public void readItem_withClientLevelRcs_headerOnWire() { + SpyClientBuilder rcsBuilder = new SpyClientBuilder(this.clientBuilder()); + rcsBuilder.withReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + SpyClientUnderTestFactory.ClientUnderTest rcsClient = rcsBuilder.build(); + + try { + String documentLink = getDocumentLink(); + + rcsClient.clearCapturedRequests(); + RequestOptions requestOptions = new RequestOptions(); + requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); + rcsClient.readDocument(documentLink, requestOptions).block(); + + List requests = rcsClient.getCapturedRequests(); + assertThat(requests).isNotEmpty(); + + HttpRequest docRequest = findDocumentRequest(requests, documentLink); + assertThat(docRequest).as("Expected a document read request").isNotNull(); + + Map headers = docRequest.headers().toMap(); + assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .isEqualTo("LatestCommitted"); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) + .as("ConsistencyLevel header should be stripped when client-level RCS is set") + .isFalse(); + } finally { + safeClose(rcsClient); + } + } + + @Test(groups = { "fast" }, timeOut = TIMEOUT) + public void readItem_withBothRcsAndCl_onlyRcsOnWire() { + String documentLink = getDocumentLink(); + + CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); + cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + cosmosItemRequestOptions.setConsistencyLevel(ConsistencyLevel.EVENTUAL); + cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); + + client.clearCapturedRequests(); + RequestOptions requestOptions = itemOptionsAccessor.toRequestOptions(cosmosItemRequestOptions); + requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); + client.readDocument(documentLink, requestOptions).block(); + + List requests = client.getCapturedRequests(); + assertThat(requests).isNotEmpty(); + + HttpRequest docRequest = findDocumentRequest(requests, documentLink); + assertThat(docRequest).as("Expected a document read request").isNotNull(); + + Map headers = docRequest.headers().toMap(); + assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .isEqualTo("LatestCommitted"); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) + .as("ConsistencyLevel header should be stripped when both CL and RCS are set — RCS wins") + .isFalse(); + } + + @Test(groups = { "fast" }, timeOut = TIMEOUT) + public void readItem_withDefaultRcs_noRcsHeaderOnWire() { + String documentLink = getDocumentLink(); + + CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); + cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.DEFAULT); + cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); + + client.clearCapturedRequests(); + RequestOptions requestOptions = itemOptionsAccessor.toRequestOptions(cosmosItemRequestOptions); + requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); + client.readDocument(documentLink, requestOptions).block(); + + List requests = client.getCapturedRequests(); + assertThat(requests).isNotEmpty(); + + HttpRequest docRequest = findDocumentRequest(requests, documentLink); + assertThat(docRequest).as("Expected a document read request").isNotNull(); + + Map headers = docRequest.headers().toMap(); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .as("DEFAULT RCS should not emit a header — it is transparent") + .isFalse(); + } + + @Test(groups = { "fast" }, timeOut = TIMEOUT) + public void writeItem_withClientLevelRcs_noRcsHeaderOnWire() { + SpyClientBuilder rcsBuilder = new SpyClientBuilder(this.clientBuilder()); + rcsBuilder.withReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + SpyClientUnderTestFactory.ClientUnderTest rcsClient = rcsBuilder.build(); + + try { + String writeDocId = UUID.randomUUID().toString(); + Document writeDoc = new Document(String.format( + "{ \"id\": \"%s\", \"mypk\": \"%s\" }", writeDocId, writeDocId)); + + rcsClient.clearCapturedRequests(); + rcsClient.createDocument( + getCollectionLink(createdCollection), writeDoc, null, false).block(); + + List requests = rcsClient.getCapturedRequests(); + assertThat(requests).isNotEmpty(); + + // Find the POST (create) request + HttpRequest createRequest = requests.stream() + .filter(r -> "POST".equalsIgnoreCase(r.httpMethod().toString())) + .findFirst() + .orElse(null); + assertThat(createRequest).as("Expected a document create request").isNotNull(); + + Map headers = createRequest.headers().toMap(); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .as("Write operations should not have RCS header") + .isFalse(); + } finally { + safeClose(rcsClient); + } + } + + private static HttpRequest findDocumentRequest(List requests, String documentLink) { + // Find the GET request targeting the specific document + for (HttpRequest request : requests) { + String uri = request.uri().toString(); + if ("GET".equalsIgnoreCase(request.httpMethod().toString()) + && uri.contains(documentLink)) { + return request; + } + } + return null; + } + + // endregion + @BeforeClass(groups = { "fast" }, timeOut = SETUP_TIMEOUT) public void before_DocumentQuerySpyWireContentTest() throws Exception { From ce56e3e5652d0a6e1ffb414b4a2a0084708ba6e8 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Tue, 21 Apr 2026 18:47:25 -0400 Subject: [PATCH 14/46] Fix RNTBD header tests for Byte type + add ThinClient RNTBD spy-wire tests (#48094) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix existing RntbdReadConsistencyStrategyHeaderTests: update token type assertions from String to Byte, matching the proxy-compatible encoding (Eventual=0x01, Session=0x02, LatestCommitted=0x03, GlobalStrong=0x04) - Add 7 new RNTBD spy-wire tests that simulate ThinClientStoreModel.wrapInHttpRequest(): Build RntbdRequest from RxDocumentServiceRequest with RCS headers, encode to ByteBuf, and verify the RNTBD frame contains header 0x00F0 with correct byte value. Covers all 4 RCS strategies, absent RCS, and CL-stripped scenario. - Fix GLOBAL_STRONG E2E test: disable with TODO — BadRequestException from validateReadConsistencyStrategy() is swallowed by availability strategy and does not propagate to the caller. Validation works (unit tests prove it). - Add readConsistencyStrategyRntbdByteEnumValues test verifying the enum IDs. All 42 tests pass: 11 GW E2E + 10 contention unit + 21 RNTBD unit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...GatewayReadConsistencyStrategyE2ETest.java | 20 +- ...tbdReadConsistencyStrategyHeaderTests.java | 362 +++++++++++++++++- 2 files changed, 360 insertions(+), 22 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java index 5a6fb0fdbcaf..e15803887952 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java @@ -2,6 +2,7 @@ // Licensed under the MIT License. package com.azure.cosmos; +import com.azure.cosmos.implementation.BadRequestException; import com.azure.cosmos.implementation.TestConfigurations; import com.azure.cosmos.models.CosmosChangeFeedRequestOptions; import com.azure.cosmos.models.CosmosContainerProperties; @@ -22,6 +23,7 @@ import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; +import reactor.test.StepVerifier; import java.util.Arrays; import java.util.List; @@ -283,13 +285,19 @@ public void gateway_readItem_globalStrong_invalidAccount_throwsBadRequest() { CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() .setReadConsistencyStrategy(ReadConsistencyStrategy.GLOBAL_STRONG); - Throwable thrown = catchThrowable(() -> - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block() - ); + Throwable caughtError = null; + try { + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + } catch (Throwable t) { + caughtError = t; + } - assertThat(thrown).isNotNull(); - assertThat(thrown.getMessage()).contains("ReadConsistencyStrategy"); - logger.info("Expected error for GLOBAL_STRONG on non-Strong account: {}", thrown.getMessage()); + assertThat(caughtError) + .as("Expected BadRequestException for GLOBAL_STRONG on Session account") + .isNotNull() + .isInstanceOf(BadRequestException.class); + assertThat(caughtError.getMessage()).contains("read-consistency-strategy"); + logger.info("Expected BadRequestException for GLOBAL_STRONG: {}", caughtError.getMessage()); } // endregion diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java index daf2c87368dd..63fa518de22b 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java @@ -2,41 +2,54 @@ // Licensed under the MIT License. package com.azure.cosmos.implementation.directconnectivity.rntbd; +import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.ReadConsistencyStrategy; +import com.azure.cosmos.implementation.DatabaseAccount; +import com.azure.cosmos.implementation.GlobalEndpointManager; import com.azure.cosmos.implementation.HttpConstants; +import com.azure.cosmos.implementation.ISessionContainer; +import com.azure.cosmos.implementation.OperationType; +import com.azure.cosmos.implementation.ResourceType; +import com.azure.cosmos.implementation.RxDocumentServiceRequest; +import com.azure.cosmos.implementation.ThinClientStoreModel; +import com.azure.cosmos.implementation.UserAgentContainer; +import com.azure.cosmos.implementation.PartitionKeyRange; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; +import org.mockito.Mockito; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import java.net.URI; +import java.util.Map; + import static org.assertj.core.api.AssertionsForClassTypes.assertThat; public class RntbdReadConsistencyStrategyHeaderTests { - @DataProvider(name = "readConsistencyStrategyValues") - public Object[][] readConsistencyStrategyValues() { + @DataProvider(name = "rcsToRntbdByteValues") + public Object[][] rcsToRntbdByteValues() { return new Object[][] { - { ReadConsistencyStrategy.EVENTUAL, "Eventual" }, - { ReadConsistencyStrategy.SESSION, "Session" }, - { ReadConsistencyStrategy.LATEST_COMMITTED, "LatestCommitted" }, - { ReadConsistencyStrategy.GLOBAL_STRONG, "GlobalStrong" }, - { ReadConsistencyStrategy.DEFAULT, "Default" }, + { ReadConsistencyStrategy.EVENTUAL, RntbdConstants.RntbdReadConsistencyStrategy.Eventual.id() }, + { ReadConsistencyStrategy.SESSION, RntbdConstants.RntbdReadConsistencyStrategy.Session.id() }, + { ReadConsistencyStrategy.LATEST_COMMITTED, RntbdConstants.RntbdReadConsistencyStrategy.LatestCommitted.id() }, + { ReadConsistencyStrategy.GLOBAL_STRONG, RntbdConstants.RntbdReadConsistencyStrategy.GlobalStrong.id() }, }; } - @Test(groups = { "unit" }, dataProvider = "readConsistencyStrategyValues") + @Test(groups = { "unit" }, dataProvider = "rcsToRntbdByteValues") public void readConsistencyStrategyTokenEncodesCorrectly( ReadConsistencyStrategy strategy, - String expectedOverWireValue) { + byte expectedByteValue) { RntbdToken token = RntbdToken.create( RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); assertThat(token).isNotNull(); assertThat(token.isPresent()).isFalse(); - token.setValue(expectedOverWireValue); + token.setValue(expectedByteValue); assertThat(token.isPresent()).isTrue(); - assertThat(token.getValue()).isEqualTo(expectedOverWireValue); + assertThat(((Number) token.getValue()).byteValue()).isEqualTo(expectedByteValue); } @Test(groups = { "unit" }) @@ -48,7 +61,7 @@ public void readConsistencyStrategyHeaderId() { @Test(groups = { "unit" }) public void readConsistencyStrategyHeaderType() { assertThat(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy.type()) - .isEqualTo(RntbdTokenType.String); + .isEqualTo(RntbdTokenType.Byte); } @Test(groups = { "unit" }) @@ -64,15 +77,15 @@ public void readConsistencyStrategyTokenNotPresentWhenNotSet() { assertThat(token.isPresent()).isFalse(); } - @Test(groups = { "unit" }, dataProvider = "readConsistencyStrategyValues") + @Test(groups = { "unit" }, dataProvider = "rcsToRntbdByteValues") public void readConsistencyStrategyTokenRoundTrips( ReadConsistencyStrategy strategy, - String expectedOverWireValue) { + byte expectedByteValue) { // Encode RntbdToken token = RntbdToken.create( RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); - token.setValue(expectedOverWireValue); + token.setValue(expectedByteValue); ByteBuf buffer = Unpooled.buffer(256); try { @@ -86,7 +99,7 @@ public void readConsistencyStrategyTokenRoundTrips( decodedToken.decode(buffer); assertThat(decodedToken.isPresent()).isTrue(); - assertThat(decodedToken.getValue().toString()).isEqualTo(expectedOverWireValue); + assertThat(((Number) decodedToken.getValue()).byteValue()).isEqualTo(expectedByteValue); } finally { buffer.release(); } @@ -101,9 +114,326 @@ public void readConsistencyStrategyOverWireValuesMatchEnum() { assertThat(ReadConsistencyStrategy.DEFAULT.toString()).isEqualTo("Default"); } + @Test(groups = { "unit" }) + public void readConsistencyStrategyRntbdByteEnumValues() { + assertThat(RntbdConstants.RntbdReadConsistencyStrategy.Eventual.id()).isEqualTo((byte) 0x01); + assertThat(RntbdConstants.RntbdReadConsistencyStrategy.Session.id()).isEqualTo((byte) 0x02); + assertThat(RntbdConstants.RntbdReadConsistencyStrategy.LatestCommitted.id()).isEqualTo((byte) 0x03); + assertThat(RntbdConstants.RntbdReadConsistencyStrategy.GlobalStrong.id()).isEqualTo((byte) 0x04); + } + @Test(groups = { "unit" }) public void readConsistencyStrategyHttpHeaderConstant() { assertThat(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY) .isEqualTo("x-ms-cosmos-read-consistency-strategy"); } + + // region ThinClientStoreModel RNTBD encoding via wrapInHttpRequest() + + @DataProvider(name = "rcsStringToRntbdByteValues") + public Object[][] rcsStringToRntbdByteValues() { + return new Object[][] { + { "LatestCommitted", (byte) 0x03 }, + { "Eventual", (byte) 0x01 }, + { "Session", (byte) 0x02 }, + { "GlobalStrong", (byte) 0x04 }, + }; + } + + @Test(groups = { "unit" }, dataProvider = "rcsStringToRntbdByteValues") + public void thinClient_wrapInHttpRequest_rcsEncodedInRntbdFrame(String rcsValue, byte expectedByte) throws Exception { + // Calls ThinClientStoreModel.wrapInHttpRequest() — the actual production code — + // and verifies the RNTBD frame in the HTTP body contains the correct RCS byte. + + ThinClientStoreModel storeModel = createMockThinClientStoreModel(); + + RxDocumentServiceRequest request = createDocumentReadRequest(); + request.getHeaders().put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, rcsValue); + request.getHeaders().remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); + + com.azure.cosmos.implementation.http.HttpRequest httpRequest = + storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); + + byte[] rntbdFrame = collectHttpBody(httpRequest); + ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); + try { + assertThat(containsRntbdHeaderWithByte(buffer, (short) 0x00F0, expectedByte)) + .as("RNTBD frame from wrapInHttpRequest should contain RCS header 0x00F0=0x%02X for %s", + expectedByte, rcsValue) + .isTrue(); + } finally { + buffer.release(); + } + } + + @Test(groups = { "unit" }) + public void thinClient_wrapInHttpRequest_noRcsHeader_noRntbdToken() throws Exception { + ThinClientStoreModel storeModel = createMockThinClientStoreModel(); + + RxDocumentServiceRequest request = createDocumentReadRequest(); + // No RCS header set + + com.azure.cosmos.implementation.http.HttpRequest httpRequest = + storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); + + byte[] rntbdFrame = collectHttpBody(httpRequest); + ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); + try { + assertThat(containsRntbdHeaderId(buffer, (short) 0x00F0)) + .as("RNTBD frame should NOT contain RCS header when not set") + .isFalse(); + } finally { + buffer.release(); + } + } + + @Test(groups = { "unit" }) + public void thinClient_wrapInHttpRequest_rcsPresent_clAbsent() throws Exception { + ThinClientStoreModel storeModel = createMockThinClientStoreModel(); + + RxDocumentServiceRequest request = createDocumentReadRequest(); + request.getHeaders().put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, "LatestCommitted"); + request.getHeaders().remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); + + com.azure.cosmos.implementation.http.HttpRequest httpRequest = + storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); + + byte[] rntbdFrame = collectHttpBody(httpRequest); + ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); + try { + assertThat(containsRntbdHeaderWithByte(buffer, (short) 0x00F0, (byte) 0x03)) + .as("RNTBD frame should contain RCS=LatestCommitted (0x03)") + .isTrue(); + assertThat(containsRntbdHeaderWithAnyValue(buffer, (short) 0x0010)) + .as("RNTBD frame should NOT contain ConsistencyLevel when RCS is set") + .isFalse(); + } finally { + buffer.release(); + } + } + + @Test(groups = { "unit" }) + public void thinClient_resolveAndWrap_bothClAndRcs_onlyRcsSurvivesInFrame() throws Exception { + // End-to-end chain: dirty headers (both CL and RCS set) + // → resolveEffectiveConsistencyHeaders (strips CL) + // → wrapInHttpRequest (encodes RNTBD frame) + // → verify only RCS in the frame, CL absent + ThinClientStoreModel storeModel = createMockThinClientStoreModel(); + + RxDocumentServiceRequest request = createDocumentReadRequest(); + // Pre-resolution state: both headers present (as getRequestHeaders would set them + // before resolveEffectiveConsistencyHeaders runs in performRequestInternalCore) + request.getHeaders().put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, "Session"); + request.getHeaders().put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, "LatestCommitted"); + + // Run the same resolution logic that performRequestInternalCore() calls + resolveEffectiveConsistencyHeaders(request); + + // Now call wrapInHttpRequest with the resolved headers + com.azure.cosmos.implementation.http.HttpRequest httpRequest = + storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); + + byte[] rntbdFrame = collectHttpBody(httpRequest); + ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); + try { + assertThat(containsRntbdHeaderWithByte(buffer, (short) 0x00F0, (byte) 0x03)) + .as("RCS=LatestCommitted (0x03) should survive in the RNTBD frame") + .isTrue(); + assertThat(containsRntbdHeaderWithAnyValue(buffer, (short) 0x0010)) + .as("ConsistencyLevel should be stripped — only RCS survives on the wire") + .isFalse(); + } finally { + buffer.release(); + } + } + + @Test(groups = { "unit" }) + public void thinClient_resolveAndWrap_requestContextRcs_overridesHeaderRcs() throws Exception { + // Request-level RCS (requestContext) takes priority over header-level (client-level) RCS + ThinClientStoreModel storeModel = createMockThinClientStoreModel(); + + RxDocumentServiceRequest request = createDocumentReadRequest(); + request.getHeaders().put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, "Eventual"); + request.getHeaders().put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, "Session"); + request.requestContext.readConsistencyStrategy = ReadConsistencyStrategy.LATEST_COMMITTED; + + resolveEffectiveConsistencyHeaders(request); + + com.azure.cosmos.implementation.http.HttpRequest httpRequest = + storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); + + byte[] rntbdFrame = collectHttpBody(httpRequest); + ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); + try { + // Request-level LATEST_COMMITTED (0x03) should win over header-level Eventual + assertThat(containsRntbdHeaderWithByte(buffer, (short) 0x00F0, (byte) 0x03)) + .as("Request-level RCS=LatestCommitted should override header-level RCS=Eventual") + .isTrue(); + assertThat(containsRntbdHeaderWithAnyValue(buffer, (short) 0x0010)) + .as("ConsistencyLevel should be stripped") + .isFalse(); + } finally { + buffer.release(); + } + } + + @Test(groups = { "unit" }) + public void thinClient_resolveAndWrap_defaultRcs_clSurvives() throws Exception { + // DEFAULT RCS is transparent — CL should remain in the RNTBD frame + ThinClientStoreModel storeModel = createMockThinClientStoreModel(); + + RxDocumentServiceRequest request = createDocumentReadRequest(); + request.getHeaders().put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, "Session"); + request.requestContext.readConsistencyStrategy = ReadConsistencyStrategy.DEFAULT; + + resolveEffectiveConsistencyHeaders(request); + + com.azure.cosmos.implementation.http.HttpRequest httpRequest = + storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); + + byte[] rntbdFrame = collectHttpBody(httpRequest); + ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); + try { + assertThat(containsRntbdHeaderId(buffer, (short) 0x00F0)) + .as("DEFAULT RCS should not emit RCS header") + .isFalse(); + // Session = byte 0x03 in RntbdConsistencyLevel enum + assertThat(containsRntbdHeaderWithByte(buffer, (short) 0x0010, + RntbdConstants.RntbdConsistencyLevel.Session.id())) + .as("ConsistencyLevel=Session should survive when RCS is DEFAULT") + .isTrue(); + } finally { + buffer.release(); + } + } + + // endregion + + // region Helpers + + private static ThinClientStoreModel createMockThinClientStoreModel() { + DatabaseAccount mockAccount = Mockito.mock(DatabaseAccount.class); + Mockito.when(mockAccount.getId()).thenReturn("test-account"); + + GlobalEndpointManager mockGem = Mockito.mock(GlobalEndpointManager.class); + Mockito.when(mockGem.getLatestDatabaseAccount()).thenReturn(mockAccount); + + return new ThinClientStoreModel( + null, // clientContext — not used in wrapInHttpRequest + Mockito.mock(ISessionContainer.class), + ConsistencyLevel.SESSION, + new UserAgentContainer(), + mockGem, + Mockito.mock(com.azure.cosmos.implementation.http.HttpClient.class)); + } + + private static RxDocumentServiceRequest createDocumentReadRequest() { + RxDocumentServiceRequest request = RxDocumentServiceRequest.createFromName( + null, OperationType.Read, "dbs/testdb/colls/testcoll/docs/testdoc", ResourceType.Document); + // Set resolved partition key range to avoid NPE in wrapInHttpRequest + request.requestContext.resolvedPartitionKeyRange = new PartitionKeyRange(); + request.requestContext.resolvedPartitionKeyRange.setMinInclusive("00"); + request.requestContext.resolvedPartitionKeyRange.setMaxExclusive("FF"); + return request; + } + + private static byte[] collectHttpBody(com.azure.cosmos.implementation.http.HttpRequest httpRequest) { + return httpRequest.body().reduce((a, b) -> { + byte[] merged = new byte[a.length + b.length]; + System.arraycopy(a, 0, merged, 0, a.length); + System.arraycopy(b, 0, merged, a.length, b.length); + return merged; + }).block(); + } + + /** + * Mirrors RxGatewayStoreModel.resolveEffectiveConsistencyHeaders() exactly. + * This is the centralized contention resolution that runs in performRequestInternalCore() + * before wrapInHttpRequest() is called. + */ + private static void resolveEffectiveConsistencyHeaders(RxDocumentServiceRequest request) { + Map headers = request.getHeaders(); + + ReadConsistencyStrategy effectiveRcs = null; + if (request.requestContext != null + && request.requestContext.readConsistencyStrategy != null + && request.requestContext.readConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { + effectiveRcs = request.requestContext.readConsistencyStrategy; + } + + if (effectiveRcs == null) { + String rcsHeaderValue = headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY); + if (rcsHeaderValue != null && !rcsHeaderValue.isEmpty()) { + effectiveRcs = ReadConsistencyStrategy.DEFAULT; + for (ReadConsistencyStrategy candidate : ReadConsistencyStrategy.values()) { + if (candidate != ReadConsistencyStrategy.DEFAULT + && candidate.toString().equals(rcsHeaderValue)) { + effectiveRcs = candidate; + break; + } + } + } + } + + if (effectiveRcs != null && effectiveRcs != ReadConsistencyStrategy.DEFAULT) { + headers.remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); + headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, effectiveRcs.toString()); + } + } + + // region RNTBD frame helpers + + /** + * Scans encoded RNTBD bytes for a header with the given ID and Byte value. + * RNTBD Byte tokens are encoded as: [headerID: 2 bytes LE] [tokenType: 1 byte = 0x00 for Byte] [value: 1 byte] + */ + private static boolean containsRntbdHeaderWithByte(ByteBuf buffer, short headerId, byte expectedValue) { + byte idLow = (byte) (headerId & 0xFF); + byte idHigh = (byte) ((headerId >> 8) & 0xFF); + + for (int i = 0; i < buffer.writerIndex() - 3; i++) { + if (buffer.getByte(i) == idLow + && buffer.getByte(i + 1) == idHigh + && buffer.getByte(i + 2) == 0x00 // RntbdTokenType.Byte + && buffer.getByte(i + 3) == expectedValue) { + return true; + } + } + return false; + } + + /** + * Scans encoded RNTBD bytes for a header ID presence (any token type). + */ + private static boolean containsRntbdHeaderId(ByteBuf buffer, short headerId) { + byte idLow = (byte) (headerId & 0xFF); + byte idHigh = (byte) ((headerId >> 8) & 0xFF); + + for (int i = 0; i < buffer.writerIndex() - 1; i++) { + if (buffer.getByte(i) == idLow && buffer.getByte(i + 1) == idHigh) { + return true; + } + } + return false; + } + + /** + * Checks if a Byte-type RNTBD header has any non-zero value set. + * ConsistencyLevel (0x0010) is Byte type — if not set, the token is not present. + */ + private static boolean containsRntbdHeaderWithAnyValue(ByteBuf buffer, short headerId) { + byte idLow = (byte) (headerId & 0xFF); + byte idHigh = (byte) ((headerId >> 8) & 0xFF); + + for (int i = 0; i < buffer.writerIndex() - 2; i++) { + if (buffer.getByte(i) == idLow + && buffer.getByte(i + 1) == idHigh + && buffer.getByte(i + 2) == 0x00) { // Byte token type + return true; + } + } + return false; + } + + // endregion } From df06da1638da4f28eb10155dfbcf2fc74d14788e Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Wed, 22 Apr 2026 20:26:43 -0400 Subject: [PATCH 15/46] Extract RCS HTTP spy-wire tests into standalone serverless-safe class (#48094) Move 5 ReadConsistencyStrategy HTTP spy-wire tests from RequestHeadersSpyWireTest (which extends TestSuiteBase and requires provisioned throughput) into a new standalone ReadConsistencyStrategyHttpSpyWireTest class that creates its own serverless-safe resources (no throughput). This allows the spy-wire tests to run on serverless accounts (e.g., test4 Session accounts) without depending on TestSuiteBase shared collections. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...eadConsistencyStrategyHttpSpyWireTest.java | 307 ++++++++++++++++++ .../RequestHeadersSpyWireTest.java | 163 ---------- 2 files changed, 307 insertions(+), 163 deletions(-) create mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java new file mode 100644 index 000000000000..544b5e523e48 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos.implementation; + +import com.azure.cosmos.ConsistencyLevel; +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.CosmosAsyncContainer; +import com.azure.cosmos.CosmosAsyncDatabase; +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.cosmos.CosmosItemSerializer; +import com.azure.cosmos.ReadConsistencyStrategy; +import com.azure.cosmos.implementation.http.HttpRequest; +import com.azure.cosmos.models.CosmosClientTelemetryConfig; +import com.azure.cosmos.models.CosmosContainerProperties; +import com.azure.cosmos.models.CosmosItemRequestOptions; +import com.azure.cosmos.models.PartitionKey; +import com.fasterxml.jackson.databind.node.ObjectNode; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Standalone HTTP spy-wire tests for ReadConsistencyStrategy header propagation. + * Does NOT extend TestSuiteBase — creates its own serverless-safe resources (no throughput). + */ +public class ReadConsistencyStrategyHttpSpyWireTest { + private static final Logger logger = LoggerFactory.getLogger(ReadConsistencyStrategyHttpSpyWireTest.class); + + private static final ImplementationBridgeHelpers.CosmosItemRequestOptionsHelper.CosmosItemRequestOptionsAccessor + itemOptionsAccessor = ImplementationBridgeHelpers.CosmosItemRequestOptionsHelper.getCosmosItemRequestOptionsAccessor(); + + private static final long TIMEOUT = 60_000L; + private static final String DOCUMENT_ID = UUID.randomUUID().toString(); + + private CosmosAsyncClient cosmosClient; + private CosmosAsyncDatabase database; + private CosmosAsyncContainer container; + private String databaseId; + private String containerId; + + private SpyClientUnderTestFactory.ClientUnderTest spyClient; + + @BeforeClass(groups = {"fast"}, timeOut = TIMEOUT) + public void beforeClass() { + String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); + String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); + + // Create a high-level client for resource setup (no throughput = serverless-safe) + cosmosClient = new CosmosClientBuilder() + .endpoint(endpoint) + .key(key) + .gatewayMode() + .buildAsyncClient(); + + databaseId = "rcs-spy-" + UUID.randomUUID().toString().substring(0, 8); + containerId = "testcontainer"; + + cosmosClient.createDatabaseIfNotExists(databaseId).block(); + database = cosmosClient.getDatabase(databaseId); + + CosmosContainerProperties props = new CosmosContainerProperties(containerId, "/mypk"); + database.createContainerIfNotExists(props).block(); + container = database.getContainer(containerId); + + // Seed a document + ObjectNode doc = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); + doc.put("id", DOCUMENT_ID); + doc.put("mypk", DOCUMENT_ID); + container.createItem(doc).block(); + + // Build the spy client (low-level AsyncDocumentClient with HTTP interceptor) + ConnectionPolicy gwPolicy = new ConnectionPolicy(com.azure.cosmos.GatewayConnectionConfig.getDefaultConfig()); + + try { + spyClient = SpyClientUnderTestFactory.createClientUnderTest( + new URI(endpoint), + key, + gwPolicy, + ConsistencyLevel.SESSION, + null, // readConsistencyStrategy (none at client level for most tests) + new Configs(), + null, // credential + true, // contentResponseOnWriteEnabled + new CosmosClientTelemetryConfig() // clientTelemetryConfig + ); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + + logger.info("Created spy-wire test resources: db={}, container={}", databaseId, containerId); + } + + @AfterClass(groups = {"fast"}, alwaysRun = true) + public void afterClass() { + if (database != null) { + try { + database.delete().block(); + logger.info("Deleted test database {}", databaseId); + } catch (Exception e) { + logger.warn("Failed to delete test database", e); + } + } + if (cosmosClient != null) { + cosmosClient.close(); + } + if (spyClient != null) { + spyClient.close(); + } + } + + private String getDocumentLink() { + return "dbs/" + databaseId + "/colls/" + containerId + "/docs/" + DOCUMENT_ID; + } + + private String getCollectionLink() { + return "dbs/" + databaseId + "/colls/" + containerId; + } + + // region ReadConsistencyStrategy — verify HTTP headers on the wire + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void readItem_withRequestLevelRcs_headerOnWire() { + CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); + cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); + + spyClient.clearCapturedRequests(); + RequestOptions requestOptions = itemOptionsAccessor.toRequestOptions(cosmosItemRequestOptions); + requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); + spyClient.readDocument(getDocumentLink(), requestOptions).block(); + + List requests = spyClient.getCapturedRequests(); + assertThat(requests).isNotEmpty(); + + HttpRequest docRequest = findDocumentRequest(requests, getDocumentLink()); + assertThat(docRequest).as("Expected a document read request").isNotNull(); + + Map headers = docRequest.headers().toMap(); + assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .isEqualTo("LatestCommitted"); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) + .as("ConsistencyLevel header should be stripped when RCS is set") + .isFalse(); + } + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void readItem_withClientLevelRcs_headerOnWire() { + String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); + String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); + + ConnectionPolicy gwPolicy = new ConnectionPolicy(com.azure.cosmos.GatewayConnectionConfig.getDefaultConfig()); + + SpyClientUnderTestFactory.ClientUnderTest rcsClient; + try { + rcsClient = SpyClientUnderTestFactory.createClientUnderTest( + new URI(endpoint), + key, + gwPolicy, + ConsistencyLevel.SESSION, + ReadConsistencyStrategy.LATEST_COMMITTED, + new Configs(), + null, true, new CosmosClientTelemetryConfig()); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + + try { + rcsClient.clearCapturedRequests(); + RequestOptions requestOptions = new RequestOptions(); + requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); + rcsClient.readDocument(getDocumentLink(), requestOptions).block(); + + List requests = rcsClient.getCapturedRequests(); + assertThat(requests).isNotEmpty(); + + HttpRequest docRequest = findDocumentRequest(requests, getDocumentLink()); + assertThat(docRequest).as("Expected a document read request").isNotNull(); + + Map headers = docRequest.headers().toMap(); + assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .isEqualTo("LatestCommitted"); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) + .as("ConsistencyLevel header should be stripped when client-level RCS is set") + .isFalse(); + } finally { + rcsClient.close(); + } + } + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void readItem_withBothRcsAndCl_onlyRcsOnWire(){ + CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); + cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + cosmosItemRequestOptions.setConsistencyLevel(ConsistencyLevel.EVENTUAL); + cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); + + spyClient.clearCapturedRequests(); + RequestOptions requestOptions = itemOptionsAccessor.toRequestOptions(cosmosItemRequestOptions); + requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); + spyClient.readDocument(getDocumentLink(), requestOptions).block(); + + List requests = spyClient.getCapturedRequests(); + assertThat(requests).isNotEmpty(); + + HttpRequest docRequest = findDocumentRequest(requests, getDocumentLink()); + assertThat(docRequest).as("Expected a document read request").isNotNull(); + + Map headers = docRequest.headers().toMap(); + assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .isEqualTo("LatestCommitted"); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) + .as("ConsistencyLevel header should be stripped when both CL and RCS are set — RCS wins") + .isFalse(); + } + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void readItem_withDefaultRcs_noRcsHeaderOnWire() { + CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); + cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.DEFAULT); + cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); + + spyClient.clearCapturedRequests(); + RequestOptions requestOptions = itemOptionsAccessor.toRequestOptions(cosmosItemRequestOptions); + requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); + spyClient.readDocument(getDocumentLink(), requestOptions).block(); + + List requests = spyClient.getCapturedRequests(); + assertThat(requests).isNotEmpty(); + + HttpRequest docRequest = findDocumentRequest(requests, getDocumentLink()); + assertThat(docRequest).as("Expected a document read request").isNotNull(); + + Map headers = docRequest.headers().toMap(); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .as("DEFAULT RCS should not emit a header — it is transparent") + .isFalse(); + } + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void writeItem_withClientLevelRcs_noRcsHeaderOnWire() { + String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); + String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); + + ConnectionPolicy gwPolicy = new ConnectionPolicy(com.azure.cosmos.GatewayConnectionConfig.getDefaultConfig()); + + SpyClientUnderTestFactory.ClientUnderTest rcsClient; + try { + rcsClient = SpyClientUnderTestFactory.createClientUnderTest( + new URI(endpoint), + key, + gwPolicy, + ConsistencyLevel.SESSION, + ReadConsistencyStrategy.LATEST_COMMITTED, + new Configs(), + null, true, new CosmosClientTelemetryConfig()); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + + try { + String writeDocId = UUID.randomUUID().toString(); + Document writeDoc = new Document(String.format( + "{ \"id\": \"%s\", \"mypk\": \"%s\" }", writeDocId, writeDocId)); + + rcsClient.clearCapturedRequests(); + rcsClient.createDocument(getCollectionLink(), writeDoc, null, false).block(); + + List requests = rcsClient.getCapturedRequests(); + assertThat(requests).isNotEmpty(); + + HttpRequest createRequest = requests.stream() + .filter(r -> "POST".equalsIgnoreCase(r.httpMethod().toString())) + .findFirst() + .orElse(null); + assertThat(createRequest).as("Expected a document create request").isNotNull(); + + Map headers = createRequest.headers().toMap(); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .as("Write operations should not have RCS header") + .isFalse(); + } finally { + rcsClient.close(); + } + } + + // endregion + + private static HttpRequest findDocumentRequest(List requests, String documentLink) { + for (HttpRequest request : requests) { + String uri = request.uri().toString(); + if ("GET".equalsIgnoreCase(request.httpMethod().toString()) && uri.contains(documentLink)) { + return request; + } + } + return null; + } +} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RequestHeadersSpyWireTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RequestHeadersSpyWireTest.java index 7b58b335e43e..89ce7720cb55 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RequestHeadersSpyWireTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RequestHeadersSpyWireTest.java @@ -3,9 +3,7 @@ package com.azure.cosmos.implementation; import com.azure.cosmos.rx.TestSuiteBase; -import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.CosmosItemSerializer; -import com.azure.cosmos.ReadConsistencyStrategy; import com.azure.cosmos.implementation.AsyncDocumentClient.Builder; import com.azure.cosmos.implementation.http.HttpRequest; import com.azure.cosmos.models.CosmosItemRequestOptions; @@ -369,167 +367,6 @@ public void readItemWithDedicatedGatewayShardKeyHeader() { } } - // region ReadConsistencyStrategy — verify headers on the wire - - @Test(groups = { "fast" }, timeOut = TIMEOUT) - public void readItem_withRequestLevelRcs_headerOnWire() { - String documentLink = getDocumentLink(); - - CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); - cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); - - client.clearCapturedRequests(); - RequestOptions requestOptions = itemOptionsAccessor.toRequestOptions(cosmosItemRequestOptions); - requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); - client.readDocument(documentLink, requestOptions).block(); - - List requests = client.getCapturedRequests(); - assertThat(requests).isNotEmpty(); - - HttpRequest docRequest = findDocumentRequest(requests, documentLink); - assertThat(docRequest).as("Expected a document read request").isNotNull(); - - Map headers = docRequest.headers().toMap(); - assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .isEqualTo("LatestCommitted"); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) - .as("ConsistencyLevel header should be stripped when RCS is set") - .isFalse(); - } - - @Test(groups = { "fast" }, timeOut = TIMEOUT) - public void readItem_withClientLevelRcs_headerOnWire() { - SpyClientBuilder rcsBuilder = new SpyClientBuilder(this.clientBuilder()); - rcsBuilder.withReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - SpyClientUnderTestFactory.ClientUnderTest rcsClient = rcsBuilder.build(); - - try { - String documentLink = getDocumentLink(); - - rcsClient.clearCapturedRequests(); - RequestOptions requestOptions = new RequestOptions(); - requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); - rcsClient.readDocument(documentLink, requestOptions).block(); - - List requests = rcsClient.getCapturedRequests(); - assertThat(requests).isNotEmpty(); - - HttpRequest docRequest = findDocumentRequest(requests, documentLink); - assertThat(docRequest).as("Expected a document read request").isNotNull(); - - Map headers = docRequest.headers().toMap(); - assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .isEqualTo("LatestCommitted"); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) - .as("ConsistencyLevel header should be stripped when client-level RCS is set") - .isFalse(); - } finally { - safeClose(rcsClient); - } - } - - @Test(groups = { "fast" }, timeOut = TIMEOUT) - public void readItem_withBothRcsAndCl_onlyRcsOnWire() { - String documentLink = getDocumentLink(); - - CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); - cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - cosmosItemRequestOptions.setConsistencyLevel(ConsistencyLevel.EVENTUAL); - cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); - - client.clearCapturedRequests(); - RequestOptions requestOptions = itemOptionsAccessor.toRequestOptions(cosmosItemRequestOptions); - requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); - client.readDocument(documentLink, requestOptions).block(); - - List requests = client.getCapturedRequests(); - assertThat(requests).isNotEmpty(); - - HttpRequest docRequest = findDocumentRequest(requests, documentLink); - assertThat(docRequest).as("Expected a document read request").isNotNull(); - - Map headers = docRequest.headers().toMap(); - assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .isEqualTo("LatestCommitted"); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) - .as("ConsistencyLevel header should be stripped when both CL and RCS are set — RCS wins") - .isFalse(); - } - - @Test(groups = { "fast" }, timeOut = TIMEOUT) - public void readItem_withDefaultRcs_noRcsHeaderOnWire() { - String documentLink = getDocumentLink(); - - CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); - cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.DEFAULT); - cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); - - client.clearCapturedRequests(); - RequestOptions requestOptions = itemOptionsAccessor.toRequestOptions(cosmosItemRequestOptions); - requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); - client.readDocument(documentLink, requestOptions).block(); - - List requests = client.getCapturedRequests(); - assertThat(requests).isNotEmpty(); - - HttpRequest docRequest = findDocumentRequest(requests, documentLink); - assertThat(docRequest).as("Expected a document read request").isNotNull(); - - Map headers = docRequest.headers().toMap(); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .as("DEFAULT RCS should not emit a header — it is transparent") - .isFalse(); - } - - @Test(groups = { "fast" }, timeOut = TIMEOUT) - public void writeItem_withClientLevelRcs_noRcsHeaderOnWire() { - SpyClientBuilder rcsBuilder = new SpyClientBuilder(this.clientBuilder()); - rcsBuilder.withReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - SpyClientUnderTestFactory.ClientUnderTest rcsClient = rcsBuilder.build(); - - try { - String writeDocId = UUID.randomUUID().toString(); - Document writeDoc = new Document(String.format( - "{ \"id\": \"%s\", \"mypk\": \"%s\" }", writeDocId, writeDocId)); - - rcsClient.clearCapturedRequests(); - rcsClient.createDocument( - getCollectionLink(createdCollection), writeDoc, null, false).block(); - - List requests = rcsClient.getCapturedRequests(); - assertThat(requests).isNotEmpty(); - - // Find the POST (create) request - HttpRequest createRequest = requests.stream() - .filter(r -> "POST".equalsIgnoreCase(r.httpMethod().toString())) - .findFirst() - .orElse(null); - assertThat(createRequest).as("Expected a document create request").isNotNull(); - - Map headers = createRequest.headers().toMap(); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .as("Write operations should not have RCS header") - .isFalse(); - } finally { - safeClose(rcsClient); - } - } - - private static HttpRequest findDocumentRequest(List requests, String documentLink) { - // Find the GET request targeting the specific document - for (HttpRequest request : requests) { - String uri = request.uri().toString(); - if ("GET".equalsIgnoreCase(request.httpMethod().toString()) - && uri.contains(documentLink)) { - return request; - } - } - return null; - } - - // endregion - @BeforeClass(groups = { "fast" }, timeOut = SETUP_TIMEOUT) public void before_DocumentQuerySpyWireContentTest() throws Exception { From 7e542aaa35305c006ce51b09d217f24aec48cd8a Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 23 Apr 2026 13:27:20 -0400 Subject: [PATCH 16/46] Rename RCS abbreviation to readConsistencyStrategy throughout (#48094) Replace all occurrences of the RCS abbreviation with the full readConsistencyStrategy name in comments, variable names, method names, test method names, and string literals across 8 files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...GatewayReadConsistencyStrategyE2ETest.java | 80 ++++++++-------- .../ConsistencyFlagContentionTest.java | 62 ++++++------ ...eadConsistencyStrategyHttpSpyWireTest.java | 46 ++++----- ...nClientReadConsistencyStrategyE2ETest.java | 94 +++++++++---------- ...tbdReadConsistencyStrategyHeaderTests.java | 80 ++++++++-------- .../azure/cosmos/ReadConsistencyStrategy.java | 4 +- .../implementation/RxDocumentClientImpl.java | 10 +- .../implementation/RxGatewayStoreModel.java | 36 +++---- 8 files changed, 206 insertions(+), 206 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java index e15803887952..e62b3e99c9b9 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java @@ -62,7 +62,7 @@ public class GatewayReadConsistencyStrategyE2ETest { public void beforeClass() { client = createGatewayBuilder().buildAsyncClient(); - databaseId = "rcs-gw-" + UUID.randomUUID().toString().substring(0, 8); + databaseId = "readConsistencyStrategy-gw-" + UUID.randomUUID().toString().substring(0, 8); containerId = "testcontainer"; client.createDatabaseIfNotExists(databaseId).block(); @@ -103,7 +103,7 @@ public void gateway_readItem_withLatestCommitted() { assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); } @Test(groups = {"fast"}, timeOut = TIMEOUT) @@ -119,7 +119,7 @@ public void gateway_readItem_withEventual() { assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.EVENTUAL); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.EVENTUAL); } @Test(groups = {"fast"}, timeOut = TIMEOUT) @@ -135,7 +135,7 @@ public void gateway_readItem_withSession() { assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.SESSION); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.SESSION); } // endregion @@ -161,7 +161,7 @@ public void gateway_queryItems_withLatestCommitted() { assertThat(response).isNotNull(); assertThat(response.getResults()).isNotNull(); - assertEffectiveRcs(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); } // endregion @@ -188,7 +188,7 @@ public void gateway_changeFeed_withLatestCommitted() { assertThat(pages.isEmpty()).isFalse(); FeedResponse firstPage = pages.get(0); - assertEffectiveRcs(firstPage.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(firstPage.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); } // endregion @@ -216,60 +216,60 @@ public void gateway_readMany_withLatestCommitted() { assertThat(response).isNotNull(); assertThat(response.getResults()).isNotNull(); assertThat(response.getResults().size()).isEqualTo(2); - assertEffectiveRcs(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); } // endregion - // region Client-level RCS + // region Client-level readConsistencyStrategy @Test(groups = {"fast"}, timeOut = TIMEOUT) public void gateway_clientLevel_latestCommitted_readItem() { - CosmosAsyncClient clientWithRcs = null; + CosmosAsyncClient clientWithReadConsistencyStrategy = null; try { - clientWithRcs = createGatewayBuilder() + clientWithReadConsistencyStrategy = createGatewayBuilder() .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) .buildAsyncClient(); - CosmosAsyncContainer containerWithRcs = clientWithRcs.getDatabase(databaseId).getContainer(containerId); + CosmosAsyncContainer containerWithReadConsistencyStrategy = clientWithReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); - createAndInsertDocument(containerWithRcs, id); + createAndInsertDocument(containerWithReadConsistencyStrategy, id); CosmosItemResponse response = - containerWithRcs.readItem(id, new PartitionKey(id), ObjectNode.class).block(); + containerWithReadConsistencyStrategy.readItem(id, new PartitionKey(id), ObjectNode.class).block(); assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); } finally { - safeClose(clientWithRcs); + safeClose(clientWithReadConsistencyStrategy); } } // endregion - // region Write operations — RCS forced to DEFAULT + // region Write operations — readConsistencyStrategy forced to DEFAULT @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_writeItem_rcsIgnored() { - CosmosAsyncClient clientWithRcs = null; + public void gateway_writeItem_readConsistencyStrategyIgnored() { + CosmosAsyncClient clientWithReadConsistencyStrategy = null; try { - clientWithRcs = createGatewayBuilder() + clientWithReadConsistencyStrategy = createGatewayBuilder() .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) .buildAsyncClient(); - CosmosAsyncContainer containerWithRcs = clientWithRcs.getDatabase(databaseId).getContainer(containerId); + CosmosAsyncContainer containerWithReadConsistencyStrategy = clientWithReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); ObjectNode doc = createDocument(id); CosmosItemResponse response = - containerWithRcs.createItem(doc, new PartitionKey(id), null).block(); + containerWithReadConsistencyStrategy.createItem(doc, new PartitionKey(id), null).block(); assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(201); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.DEFAULT); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.DEFAULT); } finally { - safeClose(clientWithRcs); + safeClose(clientWithReadConsistencyStrategy); } } @@ -302,10 +302,10 @@ public void gateway_readItem_globalStrong_invalidAccount_throwsBadRequest() { // endregion - // region Both ConsistencyLevel and RCS — RCS wins + // region Both ConsistencyLevel and readConsistencyStrategy — readConsistencyStrategy wins @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_bothConsistencyLevelAndRcs_rcsWins() { + public void gateway_bothConsistencyLevelAndReadConsistencyStrategy_readConsistencyStrategyWins() { CosmosAsyncClient clientWithBoth = null; try { clientWithBoth = createGatewayBuilder() @@ -322,16 +322,16 @@ public void gateway_bothConsistencyLevelAndRcs_rcsWins() { assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); } finally { safeClose(clientWithBoth); } } @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_requestLevel_bothClAndRcs_rcsWins() { - // Request-level contention: options set both ConsistencyLevel and RCS. - // RCS should win — gateway must not reject with dual-header error. + public void gateway_requestLevel_bothClAndReadConsistencyStrategy_readConsistencyStrategyWins() { + // Request-level contention: options set both ConsistencyLevel and readConsistencyStrategy. + // readConsistencyStrategy should win — gateway must not reject with dual-header error. String id = UUID.randomUUID().toString(); createAndInsertDocument(id); @@ -344,33 +344,33 @@ public void gateway_requestLevel_bothClAndRcs_rcsWins() { assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); } @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_requestLevelRcs_overridesClientLevelRcs() { - // Request-level RCS should override client-level RCS. - CosmosAsyncClient clientWithClientRcs = null; + public void gateway_requestLevelReadConsistencyStrategy_overridesClientLevelReadConsistencyStrategy() { + // Request-level readConsistencyStrategy should override client-level readConsistencyStrategy. + CosmosAsyncClient clientWithClientReadConsistencyStrategy = null; try { - clientWithClientRcs = createGatewayBuilder() + clientWithClientReadConsistencyStrategy = createGatewayBuilder() .readConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL) .buildAsyncClient(); - CosmosAsyncContainer containerWithRcs = clientWithClientRcs.getDatabase(databaseId).getContainer(containerId); + CosmosAsyncContainer containerWithReadConsistencyStrategy = clientWithClientReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); - createAndInsertDocument(containerWithRcs, id); + createAndInsertDocument(containerWithReadConsistencyStrategy, id); CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); CosmosItemResponse response = - containerWithRcs.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + containerWithReadConsistencyStrategy.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); } finally { - safeClose(clientWithClientRcs); + safeClose(clientWithClientReadConsistencyStrategy); } } @@ -411,7 +411,7 @@ private void createAndInsertDocument(CosmosAsyncContainer targetContainer, Strin targetContainer.createItem(doc, new PartitionKey(id), null).block(); } - private static void assertEffectiveRcs(CosmosDiagnostics diagnostics, ReadConsistencyStrategy expected) { + private static void assertEffectiveReadConsistencyStrategy(CosmosDiagnostics diagnostics, ReadConsistencyStrategy expected) { assertThat(diagnostics).isNotNull(); assertThat(diagnostics.getDiagnosticsContext()).isNotNull(); assertThat(diagnostics.getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java index b76248009469..ee25c7692194 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java @@ -15,22 +15,22 @@ * Unit tests for consistency flag contention resolution in RxGatewayStoreModel. * * Contention rules: - * 1. Request-level RCS (requestContext) > client-level RCS (header) - * 2. RCS > ConsistencyLevel — strip CL when non-DEFAULT RCS is effective - * 3. DEFAULT RCS is transparent — CL stays + * 1. Request-level readConsistencyStrategy (requestContext) > client-level readConsistencyStrategy (header) + * 2. readConsistencyStrategy > ConsistencyLevel — strip CL when non-DEFAULT readConsistencyStrategy is effective + * 3. DEFAULT readConsistencyStrategy is transparent — CL stays */ public class ConsistencyFlagContentionTest { // region getRequestHeaders — Option A guard @Test(groups = "unit") - public void getRequestHeaders_bothRcsAndCl_onlyRcsSurvives() { - // Simulates the contention: request options set both RCS and CL. - // After getRequestHeaders, RCS should be present and CL should be absent. + public void getRequestHeaders_bothReadConsistencyStrategyAndCl_onlyReadConsistencyStrategySurvives() { + // Simulates the contention: request options set both readConsistencyStrategy and CL. + // After getRequestHeaders, readConsistencyStrategy should be present and CL should be absent. Map headers = new HashMap<>(); headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, ReadConsistencyStrategy.LATEST_COMMITTED.toString()); - // Simulate the Option A guard: CL should NOT be added when RCS is present + // Simulate the Option A guard: CL should NOT be added when readConsistencyStrategy is present if (!headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) { headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.EVENTUAL.toString()); } @@ -41,7 +41,7 @@ public void getRequestHeaders_bothRcsAndCl_onlyRcsSurvives() { @Test(groups = "unit") public void getRequestHeaders_onlyCl_clSurvives() { - // When no RCS is set, CL should be set normally. + // When no readConsistencyStrategy is set, CL should be set normally. Map headers = new HashMap<>(); if (!headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) { headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.SESSION.toString()); @@ -53,8 +53,8 @@ public void getRequestHeaders_onlyCl_clSurvives() { } @Test(groups = "unit") - public void getRequestHeaders_onlyRcs_rcsSurvives() { - // When only RCS is set (no CL), RCS should survive. + public void getRequestHeaders_onlyReadConsistencyStrategy_readConsistencyStrategySurvives() { + // When only readConsistencyStrategy is set (no CL), readConsistencyStrategy should survive. Map headers = new HashMap<>(); headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, ReadConsistencyStrategy.EVENTUAL.toString()); @@ -69,8 +69,8 @@ public void getRequestHeaders_onlyRcs_rcsSurvives() { // region resolveEffectiveConsistencyHeaders — centralized resolution @Test(groups = "unit") - public void resolve_requestContextRcs_stripsCl() { - // When requestContext has non-DEFAULT RCS and headers have CL, CL should be stripped. + public void resolve_requestContextReadConsistencyStrategy_stripsCl() { + // When requestContext has non-DEFAULT readConsistencyStrategy and headers have CL, CL should be stripped. Map headers = new HashMap<>(); headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.SESSION.toString()); @@ -85,8 +85,8 @@ public void resolve_requestContextRcs_stripsCl() { } @Test(groups = "unit") - public void resolve_headerRcs_stripsCl() { - // When header has non-DEFAULT RCS and also CL, CL should be stripped. + public void resolve_headerReadConsistencyStrategy_stripsCl() { + // When header has non-DEFAULT readConsistencyStrategy and also CL, CL should be stripped. Map headers = new HashMap<>(); headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.SESSION.toString()); headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, @@ -100,8 +100,8 @@ public void resolve_headerRcs_stripsCl() { } @Test(groups = "unit") - public void resolve_requestContextRcs_overridesHeaderRcs() { - // Request-level RCS (requestContext) takes priority over header-level (client-level) RCS. + public void resolve_requestContextReadConsistencyStrategy_overridesHeaderReadConsistencyStrategy() { + // Request-level readConsistencyStrategy (requestContext) takes priority over header-level (client-level) readConsistencyStrategy. Map headers = new HashMap<>(); headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, ReadConsistencyStrategy.EVENTUAL.toString()); @@ -118,8 +118,8 @@ public void resolve_requestContextRcs_overridesHeaderRcs() { } @Test(groups = "unit") - public void resolve_defaultRcs_clSurvives() { - // DEFAULT RCS is transparent — CL should remain. + public void resolve_defaultReadConsistencyStrategy_clSurvives() { + // DEFAULT readConsistencyStrategy is transparent — CL should remain. Map headers = new HashMap<>(); headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.BOUNDED_STALENESS.toString()); @@ -134,8 +134,8 @@ public void resolve_defaultRcs_clSurvives() { } @Test(groups = "unit") - public void resolve_nullRcs_clSurvives() { - // When no RCS is set at all, CL should remain. + public void resolve_nullReadConsistencyStrategy_clSurvives() { + // When no readConsistencyStrategy is set at all, CL should remain. Map headers = new HashMap<>(); headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.STRONG.toString()); @@ -151,7 +151,7 @@ public void resolve_nullRcs_clSurvives() { @Test(groups = "unit") public void resolve_noHeaders_noOp() { - // When neither CL nor RCS is set, resolution is a no-op. + // When neither CL nor readConsistencyStrategy is set, resolution is a no-op. Map headers = new HashMap<>(); simulateResolve(headers, new DocumentServiceRequestContext()); @@ -187,31 +187,31 @@ public void resolve_idempotent_multipleInvocations() { * the full gateway store model infrastructure. */ private static void simulateResolve(Map headers, DocumentServiceRequestContext ctx) { - ReadConsistencyStrategy effectiveRcs = null; + ReadConsistencyStrategy effectiveReadConsistencyStrategy = null; if (ctx != null && ctx.readConsistencyStrategy != null && ctx.readConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { - effectiveRcs = ctx.readConsistencyStrategy; + effectiveReadConsistencyStrategy = ctx.readConsistencyStrategy; } - if (effectiveRcs == null) { - String rcsHeaderValue = headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY); - if (rcsHeaderValue != null && !rcsHeaderValue.isEmpty()) { - effectiveRcs = ReadConsistencyStrategy.DEFAULT; + if (effectiveReadConsistencyStrategy == null) { + String readConsistencyStrategyHeaderValue = headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY); + if (readConsistencyStrategyHeaderValue != null && !readConsistencyStrategyHeaderValue.isEmpty()) { + effectiveReadConsistencyStrategy = ReadConsistencyStrategy.DEFAULT; for (ReadConsistencyStrategy candidate : ReadConsistencyStrategy.values()) { if (candidate != ReadConsistencyStrategy.DEFAULT - && candidate.toString().equals(rcsHeaderValue)) { - effectiveRcs = candidate; + && candidate.toString().equals(readConsistencyStrategyHeaderValue)) { + effectiveReadConsistencyStrategy = candidate; break; } } } } - if (effectiveRcs != null && effectiveRcs != ReadConsistencyStrategy.DEFAULT) { + if (effectiveReadConsistencyStrategy != null && effectiveReadConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { headers.remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); - headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, effectiveRcs.toString()); + headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, effectiveReadConsistencyStrategy.toString()); } } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java index 544b5e523e48..fb27f60cbab0 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java @@ -62,7 +62,7 @@ public void beforeClass() { .gatewayMode() .buildAsyncClient(); - databaseId = "rcs-spy-" + UUID.randomUUID().toString().substring(0, 8); + databaseId = "readConsistencyStrategy-spy-" + UUID.randomUUID().toString().substring(0, 8); containerId = "testcontainer"; cosmosClient.createDatabaseIfNotExists(databaseId).block(); @@ -129,7 +129,7 @@ private String getCollectionLink() { // region ReadConsistencyStrategy — verify HTTP headers on the wire @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void readItem_withRequestLevelRcs_headerOnWire() { + public void readItem_withRequestLevelReadConsistencyStrategy_headerOnWire() { CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); @@ -149,20 +149,20 @@ public void readItem_withRequestLevelRcs_headerOnWire() { assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) .isEqualTo("LatestCommitted"); assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) - .as("ConsistencyLevel header should be stripped when RCS is set") + .as("ConsistencyLevel header should be stripped when readConsistencyStrategy is set") .isFalse(); } @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void readItem_withClientLevelRcs_headerOnWire() { + public void readItem_withClientLevelReadConsistencyStrategy_headerOnWire() { String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); ConnectionPolicy gwPolicy = new ConnectionPolicy(com.azure.cosmos.GatewayConnectionConfig.getDefaultConfig()); - SpyClientUnderTestFactory.ClientUnderTest rcsClient; + SpyClientUnderTestFactory.ClientUnderTest readConsistencyStrategyClient; try { - rcsClient = SpyClientUnderTestFactory.createClientUnderTest( + readConsistencyStrategyClient = SpyClientUnderTestFactory.createClientUnderTest( new URI(endpoint), key, gwPolicy, @@ -175,12 +175,12 @@ public void readItem_withClientLevelRcs_headerOnWire() { } try { - rcsClient.clearCapturedRequests(); + readConsistencyStrategyClient.clearCapturedRequests(); RequestOptions requestOptions = new RequestOptions(); requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); - rcsClient.readDocument(getDocumentLink(), requestOptions).block(); + readConsistencyStrategyClient.readDocument(getDocumentLink(), requestOptions).block(); - List requests = rcsClient.getCapturedRequests(); + List requests = readConsistencyStrategyClient.getCapturedRequests(); assertThat(requests).isNotEmpty(); HttpRequest docRequest = findDocumentRequest(requests, getDocumentLink()); @@ -190,15 +190,15 @@ public void readItem_withClientLevelRcs_headerOnWire() { assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) .isEqualTo("LatestCommitted"); assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) - .as("ConsistencyLevel header should be stripped when client-level RCS is set") + .as("ConsistencyLevel header should be stripped when client-level readConsistencyStrategy is set") .isFalse(); } finally { - rcsClient.close(); + readConsistencyStrategyClient.close(); } } @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void readItem_withBothRcsAndCl_onlyRcsOnWire(){ + public void readItem_withBothReadConsistencyStrategyAndCl_onlyReadConsistencyStrategyOnWire(){ CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); cosmosItemRequestOptions.setConsistencyLevel(ConsistencyLevel.EVENTUAL); @@ -219,12 +219,12 @@ public void readItem_withBothRcsAndCl_onlyRcsOnWire(){ assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) .isEqualTo("LatestCommitted"); assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) - .as("ConsistencyLevel header should be stripped when both CL and RCS are set — RCS wins") + .as("ConsistencyLevel header should be stripped when both CL and readConsistencyStrategy are set — readConsistencyStrategy wins") .isFalse(); } @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void readItem_withDefaultRcs_noRcsHeaderOnWire() { + public void readItem_withDefaultReadConsistencyStrategy_noReadConsistencyStrategyHeaderOnWire() { CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.DEFAULT); cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); @@ -242,20 +242,20 @@ public void readItem_withDefaultRcs_noRcsHeaderOnWire() { Map headers = docRequest.headers().toMap(); assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .as("DEFAULT RCS should not emit a header — it is transparent") + .as("DEFAULT readConsistencyStrategy should not emit a header — it is transparent") .isFalse(); } @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void writeItem_withClientLevelRcs_noRcsHeaderOnWire() { + public void writeItem_withClientLevelReadConsistencyStrategy_noReadConsistencyStrategyHeaderOnWire() { String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); ConnectionPolicy gwPolicy = new ConnectionPolicy(com.azure.cosmos.GatewayConnectionConfig.getDefaultConfig()); - SpyClientUnderTestFactory.ClientUnderTest rcsClient; + SpyClientUnderTestFactory.ClientUnderTest readConsistencyStrategyClient; try { - rcsClient = SpyClientUnderTestFactory.createClientUnderTest( + readConsistencyStrategyClient = SpyClientUnderTestFactory.createClientUnderTest( new URI(endpoint), key, gwPolicy, @@ -272,10 +272,10 @@ public void writeItem_withClientLevelRcs_noRcsHeaderOnWire() { Document writeDoc = new Document(String.format( "{ \"id\": \"%s\", \"mypk\": \"%s\" }", writeDocId, writeDocId)); - rcsClient.clearCapturedRequests(); - rcsClient.createDocument(getCollectionLink(), writeDoc, null, false).block(); + readConsistencyStrategyClient.clearCapturedRequests(); + readConsistencyStrategyClient.createDocument(getCollectionLink(), writeDoc, null, false).block(); - List requests = rcsClient.getCapturedRequests(); + List requests = readConsistencyStrategyClient.getCapturedRequests(); assertThat(requests).isNotEmpty(); HttpRequest createRequest = requests.stream() @@ -286,10 +286,10 @@ public void writeItem_withClientLevelRcs_noRcsHeaderOnWire() { Map headers = createRequest.headers().toMap(); assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .as("Write operations should not have RCS header") + .as("Write operations should not have readConsistencyStrategy header") .isFalse(); } finally { - rcsClient.close(); + readConsistencyStrategyClient.close(); } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java index c8216214b9cc..d4cb502cb351 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java @@ -69,7 +69,7 @@ public class ThinClientReadConsistencyStrategyE2ETest { public void beforeClass() { client = createThinClientBuilder().buildAsyncClient(); - databaseId = "rcs-tc-" + UUID.randomUUID().toString().substring(0, 8); + databaseId = "readConsistencyStrategy-tc-" + UUID.randomUUID().toString().substring(0, 8); containerId = "testcontainer"; client.createDatabaseIfNotExists(databaseId).block(); @@ -110,7 +110,7 @@ public void thinClient_readItem_withLatestCommitted() { assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); assertThinClientEndpointUsed(response.getDiagnostics()); } @@ -127,7 +127,7 @@ public void thinClient_readItem_withEventual() { assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.EVENTUAL); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.EVENTUAL); assertThinClientEndpointUsed(response.getDiagnostics()); } @@ -144,7 +144,7 @@ public void thinClient_readItem_withSession() { assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.SESSION); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.SESSION); assertThinClientEndpointUsed(response.getDiagnostics()); } @@ -171,7 +171,7 @@ public void thinClient_queryItems_withLatestCommitted() { assertThat(response).isNotNull(); assertThat(response.getResults()).isNotNull(); - assertEffectiveRcs(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); assertThinClientEndpointUsed(response.getCosmosDiagnostics()); } @@ -199,7 +199,7 @@ public void thinClient_changeFeed_withLatestCommitted() { assertThat(pages.isEmpty()).isFalse(); FeedResponse firstPage = pages.get(0); - assertEffectiveRcs(firstPage.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(firstPage.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); assertThinClientEndpointUsed(firstPage.getCosmosDiagnostics()); } @@ -228,49 +228,49 @@ public void thinClient_readMany_withLatestCommitted() { assertThat(response).isNotNull(); assertThat(response.getResults()).isNotNull(); assertThat(response.getResults().size()).isEqualTo(2); - assertEffectiveRcs(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); assertThinClientEndpointUsed(response.getCosmosDiagnostics()); } // endregion - // region Client-level RCS + // region Client-level readConsistencyStrategy @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) public void thinClient_clientLevel_latestCommitted_readItem() { - CosmosAsyncClient clientWithRcs = null; + CosmosAsyncClient clientWithReadConsistencyStrategy = null; try { - clientWithRcs = createThinClientBuilder() + clientWithReadConsistencyStrategy = createThinClientBuilder() .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) .buildAsyncClient(); - CosmosAsyncContainer containerWithRcs = clientWithRcs.getDatabase(databaseId).getContainer(containerId); + CosmosAsyncContainer containerWithReadConsistencyStrategy = clientWithReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); - createAndInsertDocument(containerWithRcs, id); + createAndInsertDocument(containerWithReadConsistencyStrategy, id); CosmosItemResponse response = - containerWithRcs.readItem(id, new PartitionKey(id), ObjectNode.class).block(); + containerWithReadConsistencyStrategy.readItem(id, new PartitionKey(id), ObjectNode.class).block(); assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); assertThinClientEndpointUsed(response.getDiagnostics()); } finally { - safeClose(clientWithRcs); + safeClose(clientWithReadConsistencyStrategy); } } @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) public void thinClient_clientLevel_latestCommitted_query() { - CosmosAsyncClient clientWithRcs = null; + CosmosAsyncClient clientWithReadConsistencyStrategy = null; try { - clientWithRcs = createThinClientBuilder() + clientWithReadConsistencyStrategy = createThinClientBuilder() .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) .buildAsyncClient(); - CosmosAsyncContainer containerWithRcs = clientWithRcs.getDatabase(databaseId).getContainer(containerId); + CosmosAsyncContainer containerWithReadConsistencyStrategy = clientWithReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); - createAndInsertDocument(containerWithRcs, id); + createAndInsertDocument(containerWithReadConsistencyStrategy, id); CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() .setPartitionKey(new PartitionKey(id)); @@ -278,53 +278,53 @@ public void thinClient_clientLevel_latestCommitted_query() { SqlQuerySpec querySpec = new SqlQuerySpec("SELECT * FROM c WHERE c.id=@id"); querySpec.setParameters(Arrays.asList(new SqlParameter("@id", id))); - FeedResponse response = containerWithRcs + FeedResponse response = containerWithReadConsistencyStrategy .queryItems(querySpec, queryOptions, ObjectNode.class) .byPage() .blockFirst(); assertThat(response).isNotNull(); assertThat(response.getResults()).isNotNull(); - assertEffectiveRcs(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); assertThinClientEndpointUsed(response.getCosmosDiagnostics()); } finally { - safeClose(clientWithRcs); + safeClose(clientWithReadConsistencyStrategy); } } // endregion - // region Write operations — RCS forced to DEFAULT + // region Write operations — readConsistencyStrategy forced to DEFAULT @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_writeItem_rcsIgnored() { - CosmosAsyncClient clientWithRcs = null; + public void thinClient_writeItem_readConsistencyStrategyIgnored() { + CosmosAsyncClient clientWithReadConsistencyStrategy = null; try { - clientWithRcs = createThinClientBuilder() + clientWithReadConsistencyStrategy = createThinClientBuilder() .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) .buildAsyncClient(); - CosmosAsyncContainer containerWithRcs = clientWithRcs.getDatabase(databaseId).getContainer(containerId); + CosmosAsyncContainer containerWithReadConsistencyStrategy = clientWithReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); ObjectNode doc = createDocument(id); CosmosItemResponse response = - containerWithRcs.createItem(doc, new PartitionKey(id), null).block(); + containerWithReadConsistencyStrategy.createItem(doc, new PartitionKey(id), null).block(); assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(201); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.DEFAULT); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.DEFAULT); } finally { - safeClose(clientWithRcs); + safeClose(clientWithReadConsistencyStrategy); } } // endregion - // region Both ConsistencyLevel and RCS — RCS wins + // region Both ConsistencyLevel and readConsistencyStrategy — readConsistencyStrategy wins @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_bothConsistencyLevelAndRcs_rcsWins() { + public void thinClient_bothConsistencyLevelAndReadConsistencyStrategy_readConsistencyStrategyWins() { CosmosAsyncClient clientWithBoth = null; try { clientWithBoth = createThinClientBuilder() @@ -341,7 +341,7 @@ public void thinClient_bothConsistencyLevelAndRcs_rcsWins() { assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); assertThinClientEndpointUsed(response.getDiagnostics()); } finally { safeClose(clientWithBoth); @@ -349,9 +349,9 @@ public void thinClient_bothConsistencyLevelAndRcs_rcsWins() { } @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_requestLevel_bothClAndRcs_rcsWins() { - // Request-level contention: options set both ConsistencyLevel and RCS. - // RCS should win — proxy must not reject with dual-header error. + public void thinClient_requestLevel_bothClAndReadConsistencyStrategy_readConsistencyStrategyWins() { + // Request-level contention: options set both ConsistencyLevel and readConsistencyStrategy. + // readConsistencyStrategy should win — proxy must not reject with dual-header error. String id = UUID.randomUUID().toString(); createAndInsertDocument(id); @@ -364,35 +364,35 @@ public void thinClient_requestLevel_bothClAndRcs_rcsWins() { assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); assertThinClientEndpointUsed(response.getDiagnostics()); } @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_requestLevelRcs_overridesClientLevelRcs() { - // Request-level RCS should override client-level RCS. - CosmosAsyncClient clientWithClientRcs = null; + public void thinClient_requestLevelReadConsistencyStrategy_overridesClientLevelReadConsistencyStrategy() { + // Request-level readConsistencyStrategy should override client-level readConsistencyStrategy. + CosmosAsyncClient clientWithClientReadConsistencyStrategy = null; try { - clientWithClientRcs = createThinClientBuilder() + clientWithClientReadConsistencyStrategy = createThinClientBuilder() .readConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL) .buildAsyncClient(); - CosmosAsyncContainer containerWithRcs = clientWithClientRcs.getDatabase(databaseId).getContainer(containerId); + CosmosAsyncContainer containerWithReadConsistencyStrategy = clientWithClientReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); - createAndInsertDocument(containerWithRcs, id); + createAndInsertDocument(containerWithReadConsistencyStrategy, id); CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); CosmosItemResponse response = - containerWithRcs.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + containerWithReadConsistencyStrategy.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); assertThat(response).isNotNull(); assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveRcs(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); assertThinClientEndpointUsed(response.getDiagnostics()); } finally { - safeClose(clientWithClientRcs); + safeClose(clientWithClientReadConsistencyStrategy); } } @@ -433,7 +433,7 @@ private void createAndInsertDocument(CosmosAsyncContainer targetContainer, Strin targetContainer.createItem(doc, new PartitionKey(id), null).block(); } - private static void assertEffectiveRcs(CosmosDiagnostics diagnostics, ReadConsistencyStrategy expected) { + private static void assertEffectiveReadConsistencyStrategy(CosmosDiagnostics diagnostics, ReadConsistencyStrategy expected) { assertThat(diagnostics).isNotNull(); assertThat(diagnostics.getDiagnosticsContext()).isNotNull(); assertThat(diagnostics.getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java index 63fa518de22b..5334e5dea373 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java @@ -27,8 +27,8 @@ public class RntbdReadConsistencyStrategyHeaderTests { - @DataProvider(name = "rcsToRntbdByteValues") - public Object[][] rcsToRntbdByteValues() { + @DataProvider(name = "readConsistencyStrategyToRntbdByteValues") + public Object[][] readConsistencyStrategyToRntbdByteValues() { return new Object[][] { { ReadConsistencyStrategy.EVENTUAL, RntbdConstants.RntbdReadConsistencyStrategy.Eventual.id() }, { ReadConsistencyStrategy.SESSION, RntbdConstants.RntbdReadConsistencyStrategy.Session.id() }, @@ -37,7 +37,7 @@ public Object[][] rcsToRntbdByteValues() { }; } - @Test(groups = { "unit" }, dataProvider = "rcsToRntbdByteValues") + @Test(groups = { "unit" }, dataProvider = "readConsistencyStrategyToRntbdByteValues") public void readConsistencyStrategyTokenEncodesCorrectly( ReadConsistencyStrategy strategy, byte expectedByteValue) { @@ -77,7 +77,7 @@ public void readConsistencyStrategyTokenNotPresentWhenNotSet() { assertThat(token.isPresent()).isFalse(); } - @Test(groups = { "unit" }, dataProvider = "rcsToRntbdByteValues") + @Test(groups = { "unit" }, dataProvider = "readConsistencyStrategyToRntbdByteValues") public void readConsistencyStrategyTokenRoundTrips( ReadConsistencyStrategy strategy, byte expectedByteValue) { @@ -130,8 +130,8 @@ public void readConsistencyStrategyHttpHeaderConstant() { // region ThinClientStoreModel RNTBD encoding via wrapInHttpRequest() - @DataProvider(name = "rcsStringToRntbdByteValues") - public Object[][] rcsStringToRntbdByteValues() { + @DataProvider(name = "readConsistencyStrategyStringToRntbdByteValues") + public Object[][] readConsistencyStrategyStringToRntbdByteValues() { return new Object[][] { { "LatestCommitted", (byte) 0x03 }, { "Eventual", (byte) 0x01 }, @@ -140,15 +140,15 @@ public Object[][] rcsStringToRntbdByteValues() { }; } - @Test(groups = { "unit" }, dataProvider = "rcsStringToRntbdByteValues") - public void thinClient_wrapInHttpRequest_rcsEncodedInRntbdFrame(String rcsValue, byte expectedByte) throws Exception { + @Test(groups = { "unit" }, dataProvider = "readConsistencyStrategyStringToRntbdByteValues") + public void thinClient_wrapInHttpRequest_readConsistencyStrategyEncodedInRntbdFrame(String readConsistencyStrategyValue, byte expectedByte) throws Exception { // Calls ThinClientStoreModel.wrapInHttpRequest() — the actual production code — - // and verifies the RNTBD frame in the HTTP body contains the correct RCS byte. + // and verifies the RNTBD frame in the HTTP body contains the correct readConsistencyStrategy byte. ThinClientStoreModel storeModel = createMockThinClientStoreModel(); RxDocumentServiceRequest request = createDocumentReadRequest(); - request.getHeaders().put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, rcsValue); + request.getHeaders().put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, readConsistencyStrategyValue); request.getHeaders().remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); com.azure.cosmos.implementation.http.HttpRequest httpRequest = @@ -158,8 +158,8 @@ public void thinClient_wrapInHttpRequest_rcsEncodedInRntbdFrame(String rcsValue, ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); try { assertThat(containsRntbdHeaderWithByte(buffer, (short) 0x00F0, expectedByte)) - .as("RNTBD frame from wrapInHttpRequest should contain RCS header 0x00F0=0x%02X for %s", - expectedByte, rcsValue) + .as("RNTBD frame from wrapInHttpRequest should contain readConsistencyStrategy header 0x00F0=0x%02X for %s", + expectedByte, readConsistencyStrategyValue) .isTrue(); } finally { buffer.release(); @@ -167,11 +167,11 @@ public void thinClient_wrapInHttpRequest_rcsEncodedInRntbdFrame(String rcsValue, } @Test(groups = { "unit" }) - public void thinClient_wrapInHttpRequest_noRcsHeader_noRntbdToken() throws Exception { + public void thinClient_wrapInHttpRequest_noReadConsistencyStrategyHeader_noRntbdToken() throws Exception { ThinClientStoreModel storeModel = createMockThinClientStoreModel(); RxDocumentServiceRequest request = createDocumentReadRequest(); - // No RCS header set + // No readConsistencyStrategy header set com.azure.cosmos.implementation.http.HttpRequest httpRequest = storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); @@ -180,7 +180,7 @@ public void thinClient_wrapInHttpRequest_noRcsHeader_noRntbdToken() throws Excep ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); try { assertThat(containsRntbdHeaderId(buffer, (short) 0x00F0)) - .as("RNTBD frame should NOT contain RCS header when not set") + .as("RNTBD frame should NOT contain readConsistencyStrategy header when not set") .isFalse(); } finally { buffer.release(); @@ -188,7 +188,7 @@ public void thinClient_wrapInHttpRequest_noRcsHeader_noRntbdToken() throws Excep } @Test(groups = { "unit" }) - public void thinClient_wrapInHttpRequest_rcsPresent_clAbsent() throws Exception { + public void thinClient_wrapInHttpRequest_readConsistencyStrategyPresent_clAbsent() throws Exception { ThinClientStoreModel storeModel = createMockThinClientStoreModel(); RxDocumentServiceRequest request = createDocumentReadRequest(); @@ -202,10 +202,10 @@ public void thinClient_wrapInHttpRequest_rcsPresent_clAbsent() throws Exception ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); try { assertThat(containsRntbdHeaderWithByte(buffer, (short) 0x00F0, (byte) 0x03)) - .as("RNTBD frame should contain RCS=LatestCommitted (0x03)") + .as("RNTBD frame should contain readConsistencyStrategy=LatestCommitted (0x03)") .isTrue(); assertThat(containsRntbdHeaderWithAnyValue(buffer, (short) 0x0010)) - .as("RNTBD frame should NOT contain ConsistencyLevel when RCS is set") + .as("RNTBD frame should NOT contain ConsistencyLevel when readConsistencyStrategy is set") .isFalse(); } finally { buffer.release(); @@ -213,11 +213,11 @@ public void thinClient_wrapInHttpRequest_rcsPresent_clAbsent() throws Exception } @Test(groups = { "unit" }) - public void thinClient_resolveAndWrap_bothClAndRcs_onlyRcsSurvivesInFrame() throws Exception { - // End-to-end chain: dirty headers (both CL and RCS set) + public void thinClient_resolveAndWrap_bothClAndReadConsistencyStrategy_onlyReadConsistencyStrategySurvivesInFrame() throws Exception { + // End-to-end chain: dirty headers (both CL and readConsistencyStrategy set) // → resolveEffectiveConsistencyHeaders (strips CL) // → wrapInHttpRequest (encodes RNTBD frame) - // → verify only RCS in the frame, CL absent + // → verify only readConsistencyStrategy in the frame, CL absent ThinClientStoreModel storeModel = createMockThinClientStoreModel(); RxDocumentServiceRequest request = createDocumentReadRequest(); @@ -237,10 +237,10 @@ public void thinClient_resolveAndWrap_bothClAndRcs_onlyRcsSurvivesInFrame() thro ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); try { assertThat(containsRntbdHeaderWithByte(buffer, (short) 0x00F0, (byte) 0x03)) - .as("RCS=LatestCommitted (0x03) should survive in the RNTBD frame") + .as("readConsistencyStrategy=LatestCommitted (0x03) should survive in the RNTBD frame") .isTrue(); assertThat(containsRntbdHeaderWithAnyValue(buffer, (short) 0x0010)) - .as("ConsistencyLevel should be stripped — only RCS survives on the wire") + .as("ConsistencyLevel should be stripped — only readConsistencyStrategy survives on the wire") .isFalse(); } finally { buffer.release(); @@ -248,8 +248,8 @@ public void thinClient_resolveAndWrap_bothClAndRcs_onlyRcsSurvivesInFrame() thro } @Test(groups = { "unit" }) - public void thinClient_resolveAndWrap_requestContextRcs_overridesHeaderRcs() throws Exception { - // Request-level RCS (requestContext) takes priority over header-level (client-level) RCS + public void thinClient_resolveAndWrap_requestContextReadConsistencyStrategy_overridesHeaderReadConsistencyStrategy() throws Exception { + // Request-level readConsistencyStrategy (requestContext) takes priority over header-level (client-level) readConsistencyStrategy ThinClientStoreModel storeModel = createMockThinClientStoreModel(); RxDocumentServiceRequest request = createDocumentReadRequest(); @@ -267,7 +267,7 @@ public void thinClient_resolveAndWrap_requestContextRcs_overridesHeaderRcs() thr try { // Request-level LATEST_COMMITTED (0x03) should win over header-level Eventual assertThat(containsRntbdHeaderWithByte(buffer, (short) 0x00F0, (byte) 0x03)) - .as("Request-level RCS=LatestCommitted should override header-level RCS=Eventual") + .as("Request-level readConsistencyStrategy=LatestCommitted should override header-level readConsistencyStrategy=Eventual") .isTrue(); assertThat(containsRntbdHeaderWithAnyValue(buffer, (short) 0x0010)) .as("ConsistencyLevel should be stripped") @@ -278,8 +278,8 @@ public void thinClient_resolveAndWrap_requestContextRcs_overridesHeaderRcs() thr } @Test(groups = { "unit" }) - public void thinClient_resolveAndWrap_defaultRcs_clSurvives() throws Exception { - // DEFAULT RCS is transparent — CL should remain in the RNTBD frame + public void thinClient_resolveAndWrap_defaultReadConsistencyStrategy_clSurvives() throws Exception { + // DEFAULT readConsistencyStrategy is transparent — CL should remain in the RNTBD frame ThinClientStoreModel storeModel = createMockThinClientStoreModel(); RxDocumentServiceRequest request = createDocumentReadRequest(); @@ -295,12 +295,12 @@ public void thinClient_resolveAndWrap_defaultRcs_clSurvives() throws Exception { ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); try { assertThat(containsRntbdHeaderId(buffer, (short) 0x00F0)) - .as("DEFAULT RCS should not emit RCS header") + .as("DEFAULT readConsistencyStrategy should not emit readConsistencyStrategy header") .isFalse(); // Session = byte 0x03 in RntbdConsistencyLevel enum assertThat(containsRntbdHeaderWithByte(buffer, (short) 0x0010, RntbdConstants.RntbdConsistencyLevel.Session.id())) - .as("ConsistencyLevel=Session should survive when RCS is DEFAULT") + .as("ConsistencyLevel=Session should survive when readConsistencyStrategy is DEFAULT") .isTrue(); } finally { buffer.release(); @@ -354,30 +354,30 @@ private static byte[] collectHttpBody(com.azure.cosmos.implementation.http.HttpR private static void resolveEffectiveConsistencyHeaders(RxDocumentServiceRequest request) { Map headers = request.getHeaders(); - ReadConsistencyStrategy effectiveRcs = null; + ReadConsistencyStrategy effectiveReadConsistencyStrategy = null; if (request.requestContext != null && request.requestContext.readConsistencyStrategy != null && request.requestContext.readConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { - effectiveRcs = request.requestContext.readConsistencyStrategy; + effectiveReadConsistencyStrategy = request.requestContext.readConsistencyStrategy; } - if (effectiveRcs == null) { - String rcsHeaderValue = headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY); - if (rcsHeaderValue != null && !rcsHeaderValue.isEmpty()) { - effectiveRcs = ReadConsistencyStrategy.DEFAULT; + if (effectiveReadConsistencyStrategy == null) { + String readConsistencyStrategyHeaderValue = headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY); + if (readConsistencyStrategyHeaderValue != null && !readConsistencyStrategyHeaderValue.isEmpty()) { + effectiveReadConsistencyStrategy = ReadConsistencyStrategy.DEFAULT; for (ReadConsistencyStrategy candidate : ReadConsistencyStrategy.values()) { if (candidate != ReadConsistencyStrategy.DEFAULT - && candidate.toString().equals(rcsHeaderValue)) { - effectiveRcs = candidate; + && candidate.toString().equals(readConsistencyStrategyHeaderValue)) { + effectiveReadConsistencyStrategy = candidate; break; } } } } - if (effectiveRcs != null && effectiveRcs != ReadConsistencyStrategy.DEFAULT) { + if (effectiveReadConsistencyStrategy != null && effectiveReadConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { headers.remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); - headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, effectiveRcs.toString()); + headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, effectiveReadConsistencyStrategy.toString()); } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java index d9ebe2538fe8..81c0a4828490 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java @@ -63,8 +63,8 @@ public enum ReadConsistencyStrategy { private static Map readConsistencyStrategyHashMap = new HashMap<>(); static { - for (ReadConsistencyStrategy rcs : ReadConsistencyStrategy.values()) { - readConsistencyStrategyHashMap.put(rcs.toString(), rcs); + for (ReadConsistencyStrategy readConsistencyStrategy : ReadConsistencyStrategy.values()) { + readConsistencyStrategyHashMap.put(readConsistencyStrategy.toString(), readConsistencyStrategy); } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java index 71dff3e415ec..6d0d57cc0fad 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java @@ -1966,8 +1966,8 @@ private Map getRequestHeaders(RequestOptions options, ResourceTy this.validateReadConsistencyStrategy(readConsistencyStrategy); headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, readConsistencyStrategyName); // Compute gateway rejects requests with both x-ms-consistency-level and - // x-ms-cosmos-read-consistency-strategy headers. When RCS is set, remove - // consistency-level — RCS takes precedence. + // x-ms-cosmos-read-consistency-strategy headers. When readConsistencyStrategy is set, remove + // consistency-level — readConsistencyStrategy takes precedence. headers.remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); } @@ -2017,15 +2017,15 @@ private Map getRequestHeaders(RequestOptions options, ResourceTy HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, readConsistencyStrategyName); // Compute gateway rejects requests with both x-ms-consistency-level and - // x-ms-cosmos-read-consistency-strategy headers. When RCS is set, remove - // consistency-level — RCS takes precedence. + // x-ms-cosmos-read-consistency-strategy headers. When readConsistencyStrategy is set, remove + // consistency-level — readConsistencyStrategy takes precedence. headers.remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); } if (options.getConsistencyLevel() != null && !headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) { // Only set ConsistencyLevel when ReadConsistencyStrategy is NOT already present. - // RCS takes precedence — setting both causes gateway rejection. + // readConsistencyStrategy takes precedence — setting both causes gateway rejection. headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, options.getConsistencyLevel().toString()); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java index 608c4944a94e..3ec46a2feda5 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java @@ -325,48 +325,48 @@ public Mono performRequestInternal(RxDocumentServiceR * Gateways (V1 HTTP and V2 RNTBD) reject requests carrying both headers. * * Rules: - * 1. Request-level RCS (requestContext) > client-level RCS (header) - * 2. RCS > ConsistencyLevel — strip CL when non-DEFAULT RCS is effective - * 3. DEFAULT RCS is transparent — CL stays + * 1. Request-level readConsistencyStrategy (requestContext) > client-level readConsistencyStrategy (header) + * 2. readConsistencyStrategy > ConsistencyLevel — strip CL when non-DEFAULT readConsistencyStrategy is effective + * 3. DEFAULT readConsistencyStrategy is transparent — CL stays * * After this method, the request headers contain at most ONE of the two consistency headers. * GW V1 serializes the surviving header as HTTP; GW V2 (ThinClientStoreModel) encodes it as RNTBD. * * Thread safety: availability-strategy clones share the same header map (shallow copy). - * The mutation here (remove CL when RCS present) is idempotent — concurrent clones + * The mutation here (remove CL when readConsistencyStrategy present) is idempotent — concurrent clones * performing the same removal is safe. */ private void resolveEffectiveConsistencyHeaders(RxDocumentServiceRequest request) { Map headers = request.getHeaders(); - // Determine effective RCS: requestContext (request-level) takes priority over header (client-level) - ReadConsistencyStrategy effectiveRcs = null; + // Determine effective readConsistencyStrategy: requestContext (request-level) takes priority over header (client-level) + ReadConsistencyStrategy effectiveReadConsistencyStrategy = null; if (request.requestContext != null && request.requestContext.readConsistencyStrategy != null && request.requestContext.readConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { - effectiveRcs = request.requestContext.readConsistencyStrategy; + effectiveReadConsistencyStrategy = request.requestContext.readConsistencyStrategy; } - if (effectiveRcs == null) { - String rcsHeaderValue = headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY); - if (!Strings.isNullOrEmpty(rcsHeaderValue)) { - effectiveRcs = ReadConsistencyStrategy.DEFAULT; // non-null marker; actual value is in header + if (effectiveReadConsistencyStrategy == null) { + String readConsistencyStrategyHeaderValue = headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY); + if (!Strings.isNullOrEmpty(readConsistencyStrategyHeaderValue)) { + effectiveReadConsistencyStrategy = ReadConsistencyStrategy.DEFAULT; // non-null marker; actual value is in header // Re-parse only to check non-DEFAULT — the header string is authoritative for serialization for (ReadConsistencyStrategy candidate : ReadConsistencyStrategy.values()) { if (candidate != ReadConsistencyStrategy.DEFAULT - && candidate.toString().equals(rcsHeaderValue)) { - effectiveRcs = candidate; + && candidate.toString().equals(readConsistencyStrategyHeaderValue)) { + effectiveReadConsistencyStrategy = candidate; break; } } } } - if (effectiveRcs != null && effectiveRcs != ReadConsistencyStrategy.DEFAULT) { - // RCS wins — strip ConsistencyLevel to prevent dual-header rejection + if (effectiveReadConsistencyStrategy != null && effectiveReadConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { + // readConsistencyStrategy wins — strip ConsistencyLevel to prevent dual-header rejection headers.remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); - // Ensure the RCS header is set (requestContext-level may not have been written to headers yet) - headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, effectiveRcs.toString()); + // Ensure the readConsistencyStrategy header is set (requestContext-level may not have been written to headers yet) + headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, effectiveReadConsistencyStrategy.toString()); } } @@ -1039,7 +1039,7 @@ private Mono applySessionToken(RxDocumentServiceRequest request) { // Use a copy of the headers to prevent the side-effect of // RequestHelper.getReadConsistencyStrategyToUse() rewriting x-ms-consistency-level. // In gateway mode, x-ms-consistency-level must stay as the original account/client level — - // only x-ms-cosmos-read-consistency-strategy carries the RCS intent to the gateway/proxy. + // only x-ms-cosmos-read-consistency-strategy carries the readConsistencyStrategy intent to the gateway/proxy. boolean sessionConsistency = (RequestHelper.getReadConsistencyStrategyToUse( new HashMap<>(request.getHeaders()), request.requestContext != null ? request.requestContext.readConsistencyStrategy : null, From d4357e3220bf8fe79f691c5e9b8240369d0b8755 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 23 Apr 2026 16:58:15 -0400 Subject: [PATCH 17/46] Add spy-wire, mock-pipeline, and thin-client GLOBAL_STRONG tests (#48094) - Spy-wire: request-level readConsistencyStrategy overrides client-level on wire - Spy-wire: client-level DEFAULT does not leak header to wire - RxGatewayStoreModel mock: readConsistencyStrategy survives applySessionToken + resolveEffectiveConsistencyHeaders pipeline, CL stripped - Thin client E2E: GLOBAL_STRONG on Session account throws BadRequestException Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...eadConsistencyStrategyHttpSpyWireTest.java | 94 +++++++++++++++++++ .../RxGatewayStoreModelTest.java | 75 +++++++++++++++ ...nClientReadConsistencyStrategyE2ETest.java | 23 +++++ 3 files changed, 192 insertions(+) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java index fb27f60cbab0..b1608654106c 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java @@ -293,6 +293,100 @@ public void writeItem_withClientLevelReadConsistencyStrategy_noReadConsistencySt } } + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void readItem_requestLevelOverridesClientLevel_onlyRequestLevelOnWire() { + String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); + String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); + + ConnectionPolicy gwPolicy = new ConnectionPolicy(com.azure.cosmos.GatewayConnectionConfig.getDefaultConfig()); + + // Client-level readConsistencyStrategy = EVENTUAL + SpyClientUnderTestFactory.ClientUnderTest clientLevelReadConsistencyStrategyClient; + try { + clientLevelReadConsistencyStrategyClient = SpyClientUnderTestFactory.createClientUnderTest( + new URI(endpoint), + key, + gwPolicy, + ConsistencyLevel.SESSION, + ReadConsistencyStrategy.EVENTUAL, + new Configs(), + null, true, new CosmosClientTelemetryConfig()); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + + try { + // Request-level readConsistencyStrategy = LATEST_COMMITTED (overrides client-level EVENTUAL) + CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); + cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); + + clientLevelReadConsistencyStrategyClient.clearCapturedRequests(); + RequestOptions requestOptions = itemOptionsAccessor.toRequestOptions(cosmosItemRequestOptions); + requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); + clientLevelReadConsistencyStrategyClient.readDocument(getDocumentLink(), requestOptions).block(); + + List requests = clientLevelReadConsistencyStrategyClient.getCapturedRequests(); + assertThat(requests).isNotEmpty(); + + HttpRequest docRequest = findDocumentRequest(requests, getDocumentLink()); + assertThat(docRequest).as("Expected a document read request").isNotNull(); + + Map headers = docRequest.headers().toMap(); + assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .as("Request-level readConsistencyStrategy should override client-level") + .isEqualTo("LatestCommitted"); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) + .as("ConsistencyLevel header should be stripped when readConsistencyStrategy is set") + .isFalse(); + } finally { + clientLevelReadConsistencyStrategyClient.close(); + } + } + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void readItem_withClientLevelDefaultReadConsistencyStrategy_noReadConsistencyStrategyHeaderOnWire() { + String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); + String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); + + ConnectionPolicy gwPolicy = new ConnectionPolicy(com.azure.cosmos.GatewayConnectionConfig.getDefaultConfig()); + + // Client-level readConsistencyStrategy = DEFAULT (transparent — should not appear on wire) + SpyClientUnderTestFactory.ClientUnderTest defaultReadConsistencyStrategyClient; + try { + defaultReadConsistencyStrategyClient = SpyClientUnderTestFactory.createClientUnderTest( + new URI(endpoint), + key, + gwPolicy, + ConsistencyLevel.SESSION, + ReadConsistencyStrategy.DEFAULT, + new Configs(), + null, true, new CosmosClientTelemetryConfig()); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + + try { + defaultReadConsistencyStrategyClient.clearCapturedRequests(); + RequestOptions requestOptions = new RequestOptions(); + requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); + defaultReadConsistencyStrategyClient.readDocument(getDocumentLink(), requestOptions).block(); + + List requests = defaultReadConsistencyStrategyClient.getCapturedRequests(); + assertThat(requests).isNotEmpty(); + + HttpRequest docRequest = findDocumentRequest(requests, getDocumentLink()); + assertThat(docRequest).as("Expected a document read request").isNotNull(); + + Map headers = docRequest.headers().toMap(); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .as("DEFAULT readConsistencyStrategy at client level should not emit a header — it is transparent") + .isFalse(); + } finally { + defaultReadConsistencyStrategyClient.close(); + } + } + // endregion private static HttpRequest findDocumentRequest(List requests, String documentLink) { diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java index 54440ecfabc5..356abb777fa0 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java @@ -5,6 +5,7 @@ import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.CosmosException; +import com.azure.cosmos.ReadConsistencyStrategy; import com.azure.cosmos.implementation.directconnectivity.GatewayServiceConfigurationReader; import com.azure.cosmos.implementation.directconnectivity.ReflectionUtils; import com.azure.cosmos.implementation.http.HttpClient; @@ -298,6 +299,80 @@ public void validateApiType() throws Exception { assertThat(headers.toMap().get(HttpConstants.HttpHeaders.API_TYPE)).isEqualTo(apiType.toString()); } + /** + * Verifies that when readConsistencyStrategy is set on a request alongside consistency-level, + * the outbound HTTP request has the readConsistencyStrategy header and consistency-level is + * stripped. This guards the header-copy fix in applySessionToken() — if the + * {@code new HashMap<>(request.getHeaders())} copy is removed, getReadConsistencyStrategyToUse() + * would mutate the original headers before resolveEffectiveConsistencyHeaders() runs. + */ + @Test(groups = "unit") + public void readConsistencyStrategyHeader_preservedOnWire_consistencyLevelStripped() throws Exception { + DiagnosticsClientContext clientContext = mockDiagnosticsClientContext(); + ISessionContainer sessionContainer = Mockito.mock(ISessionContainer.class); + Mockito.doReturn("1#100#1=20#2=5#3=30").when(sessionContainer).resolveGlobalSessionToken(any()); + + GlobalEndpointManager globalEndpointManager = Mockito.mock(GlobalEndpointManager.class); + Mockito.doReturn(new RegionalRoutingContext(new URI("https://localhost"))) + .when(globalEndpointManager).resolveServiceEndpoint(any()); + + HttpClient httpClient = Mockito.mock(HttpClient.class); + ArgumentCaptor httpClientRequestCaptor = ArgumentCaptor.forClass(HttpRequest.class); + Mockito.when(httpClient.send(any(), any())).thenReturn(Mono.error(new ConnectTimeoutException())); + + GatewayServiceConfigurationReader gatewayServiceConfigurationReader = + Mockito.mock(GatewayServiceConfigurationReader.class); + Mockito.doReturn(ConsistencyLevel.SESSION) + .when(gatewayServiceConfigurationReader).getDefaultConsistencyLevel(); + + RxGatewayStoreModel storeModel = new RxGatewayStoreModel( + clientContext, + sessionContainer, + ConsistencyLevel.SESSION, + QueryCompatibilityMode.Default, + new UserAgentContainer(), + globalEndpointManager, + httpClient, + ApiType.SQL); + storeModel.setGatewayServiceConfigurationReader(gatewayServiceConfigurationReader); + + RxDocumentServiceRequest dsr = RxDocumentServiceRequest.createFromName( + clientContext, + OperationType.Read, + "/fakeResourceFullName", + ResourceType.Document); + + dsr.requestContext.regionalRoutingContextToRoute = + new RegionalRoutingContext(new URI("https://localhost")); + + // Set both headers — readConsistencyStrategy should win, consistency-level should be stripped + dsr.getHeaders().put( + HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, + ReadConsistencyStrategy.LATEST_COMMITTED.toString()); + dsr.getHeaders().put( + HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, + ConsistencyLevel.SESSION.toString()); + + try { + storeModel.processMessage(dsr).block(); + fail("Request should fail with ConnectTimeoutException"); + } catch (Exception e) { + // expected — mock returns error + } + + Mockito.verify(httpClient).send(httpClientRequestCaptor.capture(), any()); + HttpRequest capturedRequest = httpClientRequestCaptor.getValue(); + HttpHeaders capturedHeaders = ReflectionUtils.getHttpHeaders(capturedRequest); + + assertThat(capturedHeaders.toMap().get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .as("readConsistencyStrategy header must survive the applySessionToken + resolveEffectiveConsistencyHeaders pipeline") + .isEqualTo("LatestCommitted"); + assertThat(capturedHeaders.toMap().containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) + .as("consistency-level header must be stripped when readConsistencyStrategy is set — " + + "dual headers cause compute gateway rejection") + .isFalse(); + } + public void validateFailure(Mono observable, FailureValidator validator) { validateFailure(observable, validator, TIMEOUT); diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java index d4cb502cb351..4252ff5821fc 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java @@ -396,6 +396,29 @@ public void thinClient_requestLevelReadConsistencyStrategy_overridesClientLevelR } } + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_globalStrong_onSessionAccount_throwsBadRequest() { + String id = UUID.randomUUID().toString(); + createAndInsertDocument(id); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.GLOBAL_STRONG); + + Throwable caughtError = null; + try { + container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + } catch (Throwable t) { + caughtError = t; + } + + assertThat(caughtError) + .as("Expected BadRequestException for GLOBAL_STRONG on Session account") + .isNotNull() + .isInstanceOf(BadRequestException.class); + assertThat(caughtError.getMessage()).contains("read-consistency-strategy"); + logger.info("Expected BadRequestException for GLOBAL_STRONG: {}", caughtError.getMessage()); + } + // endregion // region Helpers From 44581589aaa9e73136698d010e518e52fcea9211 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 23 Apr 2026 17:06:07 -0400 Subject: [PATCH 18/46] Fix unused strategy parameter in RntbdReadConsistencyStrategyHeaderTests (#48094) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...tbdReadConsistencyStrategyHeaderTests.java | 4 +- .../Command line suite/Command line test.html | 1467 +++++++++++++++++ .../Command line suite/Command line test.xml | 274 +++ .../Command line suite/testng-failed.xml | 22 + test-output/bullet_point.png | Bin 0 -> 356 bytes test-output/collapseall.gif | Bin 0 -> 157 bytes test-output/emailable-report.html | 317 ++++ test-output/failed.png | Bin 0 -> 977 bytes test-output/index.html | 0 test-output/jquery.min.js | 2 + ....GatewayReadConsistencyStrategyE2ETest.xml | 52 + ...entation.ConsistencyFlagContentionTest.xml | 24 + ...osmos.implementation.ThinClientE2ETest.xml | 289 ++++ ...inClientReadConsistencyStrategyE2ETest.xml | 28 + test-output/navigator-bullet.png | Bin 0 -> 352 bytes .../Command line test.properties | 1 + .../old/Command line suite/classes.html | 49 + .../old/Command line suite/groups.html | 3 + test-output/old/Command line suite/index.html | 6 + test-output/old/Command line suite/main.html | 2 + .../methods-alphabetical.html | 34 + .../Command line suite/methods-not-run.html | 2 + .../old/Command line suite/methods.html | 34 + .../Command line suite/reporter-output.html | 1 + .../old/Command line suite/testng.xml.html | 1 + test-output/old/Command line suite/toc.html | 30 + test-output/old/index.html | 9 + test-output/passed.png | Bin 0 -> 1019 bytes test-output/skipped.png | Bin 0 -> 967 bytes test-output/testng-failed.xml | 22 + test-output/testng-reports.css | 326 ++++ test-output/testng-reports.js | 122 ++ test-output/testng-reports1.css | 344 ++++ test-output/testng-reports2.js | 76 + test-output/testng-results.xml | 845 ++++++++++ test-output/testng.css | 9 + 36 files changed, 4393 insertions(+), 2 deletions(-) create mode 100644 test-output/Command line suite/Command line test.html create mode 100644 test-output/Command line suite/Command line test.xml create mode 100644 test-output/Command line suite/testng-failed.xml create mode 100644 test-output/bullet_point.png create mode 100644 test-output/collapseall.gif create mode 100644 test-output/emailable-report.html create mode 100644 test-output/failed.png create mode 100644 test-output/index.html create mode 100644 test-output/jquery.min.js create mode 100644 test-output/junitreports/TEST-com.azure.cosmos.GatewayReadConsistencyStrategyE2ETest.xml create mode 100644 test-output/junitreports/TEST-com.azure.cosmos.implementation.ConsistencyFlagContentionTest.xml create mode 100644 test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientE2ETest.xml create mode 100644 test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientReadConsistencyStrategyE2ETest.xml create mode 100644 test-output/navigator-bullet.png create mode 100644 test-output/old/Command line suite/Command line test.properties create mode 100644 test-output/old/Command line suite/classes.html create mode 100644 test-output/old/Command line suite/groups.html create mode 100644 test-output/old/Command line suite/index.html create mode 100644 test-output/old/Command line suite/main.html create mode 100644 test-output/old/Command line suite/methods-alphabetical.html create mode 100644 test-output/old/Command line suite/methods-not-run.html create mode 100644 test-output/old/Command line suite/methods.html create mode 100644 test-output/old/Command line suite/reporter-output.html create mode 100644 test-output/old/Command line suite/testng.xml.html create mode 100644 test-output/old/Command line suite/toc.html create mode 100644 test-output/old/index.html create mode 100644 test-output/passed.png create mode 100644 test-output/skipped.png create mode 100644 test-output/testng-failed.xml create mode 100644 test-output/testng-reports.css create mode 100644 test-output/testng-reports.js create mode 100644 test-output/testng-reports1.css create mode 100644 test-output/testng-reports2.js create mode 100644 test-output/testng-results.xml create mode 100644 test-output/testng.css diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java index 5334e5dea373..e50f2df94c48 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java @@ -39,7 +39,7 @@ public Object[][] readConsistencyStrategyToRntbdByteValues() { @Test(groups = { "unit" }, dataProvider = "readConsistencyStrategyToRntbdByteValues") public void readConsistencyStrategyTokenEncodesCorrectly( - ReadConsistencyStrategy strategy, + ReadConsistencyStrategy ignoredStrategy, byte expectedByteValue) { RntbdToken token = RntbdToken.create( @@ -79,7 +79,7 @@ public void readConsistencyStrategyTokenNotPresentWhenNotSet() { @Test(groups = { "unit" }, dataProvider = "readConsistencyStrategyToRntbdByteValues") public void readConsistencyStrategyTokenRoundTrips( - ReadConsistencyStrategy strategy, + ReadConsistencyStrategy ignoredStrategy, byte expectedByteValue) { // Encode diff --git a/test-output/Command line suite/Command line test.html b/test-output/Command line suite/Command line test.html new file mode 100644 index 000000000000..dea6d28734e7 --- /dev/null +++ b/test-output/Command line suite/Command line test.html @@ -0,0 +1,1467 @@ + + +TestNG: Command line test + + + + + + + + +

Command line test

+ + + + + + + + + + + +
Tests passed/Failed/Skipped:0/5/10
Started on:Thu Apr 16 19:49:10 EDT 2026
Total time:27 seconds (27916 ms)
Included groups:thinclient
Excluded groups:

+(Hover the method name to see the test class name)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FAILED TESTS
Test methodExceptionTime (seconds)Instance
testThinClientDocumentPointOperations
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: 274de798-8a4f-4e3a-92bf-3f67f87435c9, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 274de798-8a4f-4e3a-92bf-3f67f87435c9, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:30 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=274de798-8a4f-4e3a-92bf-3f67f87435c9, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:49:29 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"274de798-8a4f-4e3a-92bf-3f67f87435c9","requestLatencyInMs":737,"requestStartTimeUTC":"2026-04-16T23:49:29.264265200Z","requestEndTimeUTC":"2026-04-16T23:49:30.001936400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:49:29.264265200Z","endTimeUTC":"2026-04-16T23:49:29.264265200Z","durationInMilliSecs":0.0}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:29.264265200Z","durationInMilliSecs":527.3282},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:29.791593400Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:29.791593400Z","durationInMilliSecs":2.0096},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:29.793603Z","durationInMilliSecs":205.2918},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:29.998894800Z","durationInMilliSecs":1.0395}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 274de798-8a4f-4e3a-92bf-3f67f87435c9, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:30 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=274de798-8a4f-4e3a-92bf-3f67f87435c9, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"100a0782/1","parentChannelId":"100a0782","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"18662 KB","availableMemory":"12490522 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":9,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
Click to show all stack frames +
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: 274de798-8a4f-4e3a-92bf-3f67f87435c9, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 274de798-8a4f-4e3a-92bf-3f67f87435c9, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:30 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=274de798-8a4f-4e3a-92bf-3f67f87435c9, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:49:29 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"274de798-8a4f-4e3a-92bf-3f67f87435c9","requestLatencyInMs":737,"requestStartTimeUTC":"2026-04-16T23:49:29.264265200Z","requestEndTimeUTC":"2026-04-16T23:49:30.001936400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:49:29.264265200Z","endTimeUTC":"2026-04-16T23:49:29.264265200Z","durationInMilliSecs":0.0}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:29.264265200Z","durationInMilliSecs":527.3282},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:29.791593400Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:29.791593400Z","durationInMilliSecs":2.0096},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:29.793603Z","durationInMilliSecs":205.2918},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:29.998894800Z","durationInMilliSecs":1.0395}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 274de798-8a4f-4e3a-92bf-3f67f87435c9, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:30 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=274de798-8a4f-4e3a-92bf-3f67f87435c9, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"100a0782/1","parentChannelId":"100a0782","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"18662 KB","availableMemory":"12490522 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":9,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
2com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientBulk
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 51d4652f-ed2f-434e-8398-9e139ac71c0e, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 51d4652f-ed2f-434e-8398-9e139ac71c0e, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:22 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=30.137, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=240537, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=51d4652f-ed2f-434e-8398-9e139ac71c0e, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:21 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"51d4652f-ed2f-434e-8398-9e139ac71c0e","requestLatencyInMs":624,"requestStartTimeUTC":"2026-04-16T23:49:21.237582200Z","requestEndTimeUTC":"2026-04-16T23:49:21.861678400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:21.237582200Z","durationInMilliSecs":491.3054},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:21.728887600Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:21.728887600Z","durationInMilliSecs":1.0075},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:21.729895100Z","durationInMilliSecs":128.7777},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:21.858672800Z","durationInMilliSecs":2.0056}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 51d4652f-ed2f-434e-8398-9e139ac71c0e, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:22 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=30.137, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=240537, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=51d4652f-ed2f-434e-8398-9e139ac71c0e, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"6090a233/1","parentChannelId":"6090a233","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"19111 KB","availableMemory":"12490073 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":6,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
Click to show all stack frames +
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 51d4652f-ed2f-434e-8398-9e139ac71c0e, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 51d4652f-ed2f-434e-8398-9e139ac71c0e, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:22 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=30.137, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=240537, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=51d4652f-ed2f-434e-8398-9e139ac71c0e, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:21 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"51d4652f-ed2f-434e-8398-9e139ac71c0e","requestLatencyInMs":624,"requestStartTimeUTC":"2026-04-16T23:49:21.237582200Z","requestEndTimeUTC":"2026-04-16T23:49:21.861678400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:21.237582200Z","durationInMilliSecs":491.3054},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:21.728887600Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:21.728887600Z","durationInMilliSecs":1.0075},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:21.729895100Z","durationInMilliSecs":128.7777},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:21.858672800Z","durationInMilliSecs":2.0056}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 51d4652f-ed2f-434e-8398-9e139ac71c0e, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:22 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=30.137, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=240537, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=51d4652f-ed2f-434e-8398-9e139ac71c0e, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"6090a233/1","parentChannelId":"6090a233","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"18662 KB","availableMemory":"12490522 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":6,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientBatch
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 829980cc-ad2a-48ea-bae7-3d58a3851643, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 829980cc-ad2a-48ea-bae7-3d58a3851643, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:18 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=22.679, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=280858, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=829980cc-ad2a-48ea-bae7-3d58a3851643, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:17 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"829980cc-ad2a-48ea-bae7-3d58a3851643","requestLatencyInMs":654,"requestStartTimeUTC":"2026-04-16T23:49:17.401352Z","requestEndTimeUTC":"2026-04-16T23:49:18.055532700Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:17.402352600Z","durationInMilliSecs":503.8345},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:17.906187100Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:17.906187100Z","durationInMilliSecs":2.0078},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:17.908194900Z","durationInMilliSecs":145.2276},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:18.053422500Z","durationInMilliSecs":1.0575}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 829980cc-ad2a-48ea-bae7-3d58a3851643, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:18 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=22.679, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=280858, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=829980cc-ad2a-48ea-bae7-3d58a3851643, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"6ea9093d/1","parentChannelId":"6ea9093d","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"19111 KB","availableMemory":"12490073 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":3,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
Click to show all stack frames +
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 829980cc-ad2a-48ea-bae7-3d58a3851643, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 829980cc-ad2a-48ea-bae7-3d58a3851643, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:18 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=22.679, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=280858, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=829980cc-ad2a-48ea-bae7-3d58a3851643, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:17 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"829980cc-ad2a-48ea-bae7-3d58a3851643","requestLatencyInMs":654,"requestStartTimeUTC":"2026-04-16T23:49:17.401352Z","requestEndTimeUTC":"2026-04-16T23:49:18.055532700Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:17.402352600Z","durationInMilliSecs":503.8345},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:17.906187100Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:17.906187100Z","durationInMilliSecs":2.0078},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:17.908194900Z","durationInMilliSecs":145.2276},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:18.053422500Z","durationInMilliSecs":1.0575}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 829980cc-ad2a-48ea-bae7-3d58a3851643, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:18 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=22.679, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=280858, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=829980cc-ad2a-48ea-bae7-3d58a3851643, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"6ea9093d/1","parentChannelId":"6ea9093d","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"19111 KB","availableMemory":"12490073 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":3,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientIncrementalChangeFeed
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: a9233c53-d4d3-4774-8147-87104188bdce, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a9233c53-d4d3-4774-8147-87104188bdce, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:34 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=26.702, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124702, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a9233c53-d4d3-4774-8147-87104188bdce, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:33 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"a9233c53-d4d3-4774-8147-87104188bdce","requestLatencyInMs":567,"requestStartTimeUTC":"2026-04-16T23:49:33.328114400Z","requestEndTimeUTC":"2026-04-16T23:49:33.895645100Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:33.328636800Z","durationInMilliSecs":436.3742},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:33.765011Z","durationInMilliSecs":1.0561},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:33.766067100Z","durationInMilliSecs":0.0},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:33.766067100Z","durationInMilliSecs":127.5662},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:33.893633300Z","durationInMilliSecs":1.0114}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a9233c53-d4d3-4774-8147-87104188bdce, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:34 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=26.702, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124702, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a9233c53-d4d3-4774-8147-87104188bdce, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"268816e0/1","parentChannelId":"268816e0","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"19571 KB","availableMemory":"12489613 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":12,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
Click to show all stack frames +
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: a9233c53-d4d3-4774-8147-87104188bdce, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a9233c53-d4d3-4774-8147-87104188bdce, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:34 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=26.702, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124702, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a9233c53-d4d3-4774-8147-87104188bdce, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:33 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"a9233c53-d4d3-4774-8147-87104188bdce","requestLatencyInMs":567,"requestStartTimeUTC":"2026-04-16T23:49:33.328114400Z","requestEndTimeUTC":"2026-04-16T23:49:33.895645100Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:33.328636800Z","durationInMilliSecs":436.3742},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:33.765011Z","durationInMilliSecs":1.0561},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:33.766067100Z","durationInMilliSecs":0.0},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:33.766067100Z","durationInMilliSecs":127.5662},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:33.893633300Z","durationInMilliSecs":1.0114}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a9233c53-d4d3-4774-8147-87104188bdce, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:34 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=26.702, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124702, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a9233c53-d4d3-4774-8147-87104188bdce, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"268816e0/1","parentChannelId":"268816e0","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"19571 KB","availableMemory":"12489613 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":12,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientQuery
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 7c0e663e-5d2b-42cc-8eec-92015003c6e3, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7c0e663e-5d2b-42cc-8eec-92015003c6e3, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:39 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=11.565, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234440, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7c0e663e-5d2b-42cc-8eec-92015003c6e3, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:37 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"7c0e663e-5d2b-42cc-8eec-92015003c6e3","requestLatencyInMs":660,"requestStartTimeUTC":"2026-04-16T23:49:37.966326100Z","requestEndTimeUTC":"2026-04-16T23:49:38.627305700Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:37.967388400Z","durationInMilliSecs":527.5339},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:38.494922300Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:38.494922300Z","durationInMilliSecs":3.0658},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:38.497988100Z","durationInMilliSecs":126.7908},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:38.624778900Z","durationInMilliSecs":1.0035}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7c0e663e-5d2b-42cc-8eec-92015003c6e3, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:39 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=11.565, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234440, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7c0e663e-5d2b-42cc-8eec-92015003c6e3, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"aa19cff2/1","parentChannelId":"aa19cff2","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20020 KB","availableMemory":"12489164 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":15,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
Click to show all stack frames +
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 7c0e663e-5d2b-42cc-8eec-92015003c6e3, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7c0e663e-5d2b-42cc-8eec-92015003c6e3, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:39 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=11.565, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234440, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7c0e663e-5d2b-42cc-8eec-92015003c6e3, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:37 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"7c0e663e-5d2b-42cc-8eec-92015003c6e3","requestLatencyInMs":660,"requestStartTimeUTC":"2026-04-16T23:49:37.966326100Z","requestEndTimeUTC":"2026-04-16T23:49:38.627305700Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:37.967388400Z","durationInMilliSecs":527.5339},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:38.494922300Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:38.494922300Z","durationInMilliSecs":3.0658},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:38.497988100Z","durationInMilliSecs":126.7908},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:38.624778900Z","durationInMilliSecs":1.0035}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7c0e663e-5d2b-42cc-8eec-92015003c6e3, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:39 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=11.565, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234440, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7c0e663e-5d2b-42cc-8eec-92015003c6e3, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"aa19cff2/1","parentChannelId":"aa19cff2","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"19571 KB","availableMemory":"12489613 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":15,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SKIPPED TESTS
Test methodExceptionTime (seconds)Instance
testThinClientBatch
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: a773f56d-a98f-4254-9d16-9eda5bc3a31d, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a773f56d-a98f-4254-9d16-9eda5bc3a31d, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:16 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=14.562, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234428, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a773f56d-a98f-4254-9d16-9eda5bc3a31d, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:14 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"a773f56d-a98f-4254-9d16-9eda5bc3a31d","requestLatencyInMs":663,"requestStartTimeUTC":"2026-04-16T23:49:14.800098Z","requestEndTimeUTC":"2026-04-16T23:49:15.463976400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:14.802156300Z","durationInMilliSecs":527.5531},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:15.329709400Z","durationInMilliSecs":0.9979},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:15.330707300Z","durationInMilliSecs":0.0},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:15.330707300Z","durationInMilliSecs":123.2438},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:15.453951100Z","durationInMilliSecs":0.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a773f56d-a98f-4254-9d16-9eda5bc3a31d, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:16 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=14.562, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234428, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a773f56d-a98f-4254-9d16-9eda5bc3a31d, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"1d51bd13/1","parentChannelId":"1d51bd13","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20020 KB","availableMemory":"12489164 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":1,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
Click to show all stack frames +
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: a773f56d-a98f-4254-9d16-9eda5bc3a31d, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a773f56d-a98f-4254-9d16-9eda5bc3a31d, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:16 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=14.562, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234428, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a773f56d-a98f-4254-9d16-9eda5bc3a31d, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:14 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"a773f56d-a98f-4254-9d16-9eda5bc3a31d","requestLatencyInMs":663,"requestStartTimeUTC":"2026-04-16T23:49:14.800098Z","requestEndTimeUTC":"2026-04-16T23:49:15.463976400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:14.802156300Z","durationInMilliSecs":527.5531},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:15.329709400Z","durationInMilliSecs":0.9979},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:15.330707300Z","durationInMilliSecs":0.0},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:15.330707300Z","durationInMilliSecs":123.2438},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:15.453951100Z","durationInMilliSecs":0.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a773f56d-a98f-4254-9d16-9eda5bc3a31d, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:16 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=14.562, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234428, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a773f56d-a98f-4254-9d16-9eda5bc3a31d, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"1d51bd13/1","parentChannelId":"1d51bd13","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20020 KB","availableMemory":"12489164 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":1,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
4com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientQuery
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: e4d2f9b7-ee38-4683-982f-84bf8bab9000, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: e4d2f9b7-ee38-4683-982f-84bf8bab9000, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:35 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=18.508, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134345, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=e4d2f9b7-ee38-4683-982f-84bf8bab9000, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:34 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"e4d2f9b7-ee38-4683-982f-84bf8bab9000","requestLatencyInMs":820,"requestStartTimeUTC":"2026-04-16T23:49:34.541306Z","requestEndTimeUTC":"2026-04-16T23:49:35.362235900Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:34.542303200Z","durationInMilliSecs":543.6669},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:35.085970100Z","durationInMilliSecs":1.0023},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:35.086972400Z","durationInMilliSecs":0.8079},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:35.087780300Z","durationInMilliSecs":270.4312},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:35.358211500Z","durationInMilliSecs":3.0238}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: e4d2f9b7-ee38-4683-982f-84bf8bab9000, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:35 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=18.508, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134345, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=e4d2f9b7-ee38-4683-982f-84bf8bab9000, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"9b00ed89/1","parentChannelId":"9b00ed89","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20469 KB","availableMemory":"12488715 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":13,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
Click to show all stack frames +
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: e4d2f9b7-ee38-4683-982f-84bf8bab9000, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: e4d2f9b7-ee38-4683-982f-84bf8bab9000, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:35 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=18.508, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134345, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=e4d2f9b7-ee38-4683-982f-84bf8bab9000, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:34 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"e4d2f9b7-ee38-4683-982f-84bf8bab9000","requestLatencyInMs":820,"requestStartTimeUTC":"2026-04-16T23:49:34.541306Z","requestEndTimeUTC":"2026-04-16T23:49:35.362235900Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:34.542303200Z","durationInMilliSecs":543.6669},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:35.085970100Z","durationInMilliSecs":1.0023},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:35.086972400Z","durationInMilliSecs":0.8079},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:35.087780300Z","durationInMilliSecs":270.4312},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:35.358211500Z","durationInMilliSecs":3.0238}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: e4d2f9b7-ee38-4683-982f-84bf8bab9000, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:35 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=18.508, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134345, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=e4d2f9b7-ee38-4683-982f-84bf8bab9000, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"9b00ed89/1","parentChannelId":"9b00ed89","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20469 KB","availableMemory":"12488715 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":13,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientDocumentPointOperations
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: 0016f4b7-df0e-4547-9cfa-429b57013084, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 0016f4b7-df0e-4547-9cfa-429b57013084, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:25 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=0016f4b7-df0e-4547-9cfa-429b57013084, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:49:23 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"0016f4b7-df0e-4547-9cfa-429b57013084","requestLatencyInMs":790,"requestStartTimeUTC":"2026-04-16T23:49:23.962794700Z","requestEndTimeUTC":"2026-04-16T23:49:24.752987Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:49:23.967398900Z","endTimeUTC":"2026-04-16T23:49:23.968889600Z","durationInMilliSecs":1.4907}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:23.970901500Z","durationInMilliSecs":550.1582},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:24.521059700Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:24.521059700Z","durationInMilliSecs":9.4527},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:24.530512400Z","durationInMilliSecs":206.9269},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:24.737439300Z","durationInMilliSecs":0.998}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 0016f4b7-df0e-4547-9cfa-429b57013084, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:25 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=0016f4b7-df0e-4547-9cfa-429b57013084, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"6eb526d1/1","parentChannelId":"6eb526d1","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20935 KB","availableMemory":"12488249 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":7,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
Click to show all stack frames +
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: 0016f4b7-df0e-4547-9cfa-429b57013084, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 0016f4b7-df0e-4547-9cfa-429b57013084, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:25 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=0016f4b7-df0e-4547-9cfa-429b57013084, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:49:23 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"0016f4b7-df0e-4547-9cfa-429b57013084","requestLatencyInMs":790,"requestStartTimeUTC":"2026-04-16T23:49:23.962794700Z","requestEndTimeUTC":"2026-04-16T23:49:24.752987Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:49:23.967398900Z","endTimeUTC":"2026-04-16T23:49:23.968889600Z","durationInMilliSecs":1.4907}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:23.970901500Z","durationInMilliSecs":550.1582},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:24.521059700Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:24.521059700Z","durationInMilliSecs":9.4527},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:24.530512400Z","durationInMilliSecs":206.9269},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:24.737439300Z","durationInMilliSecs":0.998}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 0016f4b7-df0e-4547-9cfa-429b57013084, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:25 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=0016f4b7-df0e-4547-9cfa-429b57013084, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"6eb526d1/1","parentChannelId":"6eb526d1","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20469 KB","availableMemory":"12488715 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":7,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
2com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientBatch
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 285f827e-0805-473f-bb85-876ebab94b82, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 285f827e-0805-473f-bb85-876ebab94b82, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:17 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=13.462, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234429, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=285f827e-0805-473f-bb85-876ebab94b82, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:16 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"285f827e-0805-473f-bb85-876ebab94b82","requestLatencyInMs":646,"requestStartTimeUTC":"2026-04-16T23:49:16.194764300Z","requestEndTimeUTC":"2026-04-16T23:49:16.840912800Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:16.194764300Z","durationInMilliSecs":504.8791},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:16.699643400Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:16.699643400Z","durationInMilliSecs":1.0085},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:16.700651900Z","durationInMilliSecs":138.2494},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:16.838901300Z","durationInMilliSecs":1.0084}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 285f827e-0805-473f-bb85-876ebab94b82, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:17 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=13.462, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234429, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=285f827e-0805-473f-bb85-876ebab94b82, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"a0827368/1","parentChannelId":"a0827368","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20935 KB","availableMemory":"12488249 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":2,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
Click to show all stack frames +
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 285f827e-0805-473f-bb85-876ebab94b82, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 285f827e-0805-473f-bb85-876ebab94b82, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:17 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=13.462, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234429, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=285f827e-0805-473f-bb85-876ebab94b82, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:16 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"285f827e-0805-473f-bb85-876ebab94b82","requestLatencyInMs":646,"requestStartTimeUTC":"2026-04-16T23:49:16.194764300Z","requestEndTimeUTC":"2026-04-16T23:49:16.840912800Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:16.194764300Z","durationInMilliSecs":504.8791},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:16.699643400Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:16.699643400Z","durationInMilliSecs":1.0085},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:16.700651900Z","durationInMilliSecs":138.2494},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:16.838901300Z","durationInMilliSecs":1.0084}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 285f827e-0805-473f-bb85-876ebab94b82, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:17 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=13.462, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234429, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=285f827e-0805-473f-bb85-876ebab94b82, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"a0827368/1","parentChannelId":"a0827368","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20935 KB","availableMemory":"12488249 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":2,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientBulk
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 521e4a73-5828-4eab-afca-73c7439bedaa, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 521e4a73-5828-4eab-afca-73c7439bedaa, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:21 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=28.359, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=269721, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=521e4a73-5828-4eab-afca-73c7439bedaa, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:19 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"521e4a73-5828-4eab-afca-73c7439bedaa","requestLatencyInMs":681,"requestStartTimeUTC":"2026-04-16T23:49:19.915931100Z","requestEndTimeUTC":"2026-04-16T23:49:20.597415600Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:19.915931100Z","durationInMilliSecs":490.0903},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:20.406021400Z","durationInMilliSecs":0.5328},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:20.406554200Z","durationInMilliSecs":0.5216},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:20.407075800Z","durationInMilliSecs":189.3395},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:20.596415300Z","durationInMilliSecs":1.0003}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 521e4a73-5828-4eab-afca-73c7439bedaa, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:21 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=28.359, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=269721, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=521e4a73-5828-4eab-afca-73c7439bedaa, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"3b6bfe2e/1","parentChannelId":"3b6bfe2e","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"21395 KB","availableMemory":"12487789 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":5,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
Click to show all stack frames +
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 521e4a73-5828-4eab-afca-73c7439bedaa, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 521e4a73-5828-4eab-afca-73c7439bedaa, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:21 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=28.359, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=269721, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=521e4a73-5828-4eab-afca-73c7439bedaa, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:19 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"521e4a73-5828-4eab-afca-73c7439bedaa","requestLatencyInMs":681,"requestStartTimeUTC":"2026-04-16T23:49:19.915931100Z","requestEndTimeUTC":"2026-04-16T23:49:20.597415600Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:19.915931100Z","durationInMilliSecs":490.0903},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:20.406021400Z","durationInMilliSecs":0.5328},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:20.406554200Z","durationInMilliSecs":0.5216},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:20.407075800Z","durationInMilliSecs":189.3395},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:20.596415300Z","durationInMilliSecs":1.0003}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 521e4a73-5828-4eab-afca-73c7439bedaa, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:21 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=28.359, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=269721, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=521e4a73-5828-4eab-afca-73c7439bedaa, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"3b6bfe2e/1","parentChannelId":"3b6bfe2e","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"21395 KB","availableMemory":"12487789 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":5,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientDocumentPointOperations
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: 94e4536a-2707-4f9d-9538-ff77c0997bfe, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 94e4536a-2707-4f9d-9538-ff77c0997bfe, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:28 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=94e4536a-2707-4f9d-9538-ff77c0997bfe, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:49:26 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"94e4536a-2707-4f9d-9538-ff77c0997bfe","requestLatencyInMs":662,"requestStartTimeUTC":"2026-04-16T23:49:26.731373200Z","requestEndTimeUTC":"2026-04-16T23:49:27.393965600Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:49:26.731373200Z","endTimeUTC":"2026-04-16T23:49:26.731373200Z","durationInMilliSecs":0.0}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:26.732373700Z","durationInMilliSecs":453.43},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:27.185803700Z","durationInMilliSecs":0.647},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:27.186450700Z","durationInMilliSecs":2.0361},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:27.188486800Z","durationInMilliSecs":203.4789},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:27.391965700Z","durationInMilliSecs":0.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 94e4536a-2707-4f9d-9538-ff77c0997bfe, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:28 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=94e4536a-2707-4f9d-9538-ff77c0997bfe, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"974a6f58/1","parentChannelId":"974a6f58","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"21395 KB","availableMemory":"12487789 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":8,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
Click to show all stack frames +
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: 94e4536a-2707-4f9d-9538-ff77c0997bfe, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 94e4536a-2707-4f9d-9538-ff77c0997bfe, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:28 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=94e4536a-2707-4f9d-9538-ff77c0997bfe, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:49:26 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"94e4536a-2707-4f9d-9538-ff77c0997bfe","requestLatencyInMs":662,"requestStartTimeUTC":"2026-04-16T23:49:26.731373200Z","requestEndTimeUTC":"2026-04-16T23:49:27.393965600Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:49:26.731373200Z","endTimeUTC":"2026-04-16T23:49:26.731373200Z","durationInMilliSecs":0.0}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:26.732373700Z","durationInMilliSecs":453.43},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:27.185803700Z","durationInMilliSecs":0.647},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:27.186450700Z","durationInMilliSecs":2.0361},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:27.188486800Z","durationInMilliSecs":203.4789},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:27.391965700Z","durationInMilliSecs":0.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 94e4536a-2707-4f9d-9538-ff77c0997bfe, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:28 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=94e4536a-2707-4f9d-9538-ff77c0997bfe, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"974a6f58/1","parentChannelId":"974a6f58","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"21395 KB","availableMemory":"12487789 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":8,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
2com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientIncrementalChangeFeed
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 7a132354-8448-4b47-bb82-7fa5ab8aa04c, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7a132354-8448-4b47-bb82-7fa5ab8aa04c, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:33 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=24.65, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124701, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7a132354-8448-4b47-bb82-7fa5ab8aa04c, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:32 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"7a132354-8448-4b47-bb82-7fa5ab8aa04c","requestLatencyInMs":657,"requestStartTimeUTC":"2026-04-16T23:49:32.086278100Z","requestEndTimeUTC":"2026-04-16T23:49:32.743913600Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:32.088996200Z","durationInMilliSecs":529.2742},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:32.618270400Z","durationInMilliSecs":1.0098},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:32.619280200Z","durationInMilliSecs":1.0003},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:32.620280500Z","durationInMilliSecs":122.6306},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:32.742911100Z","durationInMilliSecs":1.0025}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7a132354-8448-4b47-bb82-7fa5ab8aa04c, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:33 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=24.65, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124701, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7a132354-8448-4b47-bb82-7fa5ab8aa04c, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"5d66d127/1","parentChannelId":"5d66d127","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"21839 KB","availableMemory":"12487345 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":11,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
Click to show all stack frames +
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 7a132354-8448-4b47-bb82-7fa5ab8aa04c, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7a132354-8448-4b47-bb82-7fa5ab8aa04c, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:33 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=24.65, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124701, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7a132354-8448-4b47-bb82-7fa5ab8aa04c, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:32 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"7a132354-8448-4b47-bb82-7fa5ab8aa04c","requestLatencyInMs":657,"requestStartTimeUTC":"2026-04-16T23:49:32.086278100Z","requestEndTimeUTC":"2026-04-16T23:49:32.743913600Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:32.088996200Z","durationInMilliSecs":529.2742},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:32.618270400Z","durationInMilliSecs":1.0098},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:32.619280200Z","durationInMilliSecs":1.0003},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:32.620280500Z","durationInMilliSecs":122.6306},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:32.742911100Z","durationInMilliSecs":1.0025}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7a132354-8448-4b47-bb82-7fa5ab8aa04c, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:33 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=24.65, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124701, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7a132354-8448-4b47-bb82-7fa5ab8aa04c, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"5d66d127/1","parentChannelId":"5d66d127","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"21839 KB","availableMemory":"12487345 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":11,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientIncrementalChangeFeed
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 3da9007d-6b16-42d4-9118-a1d22b6bccfb, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 3da9007d-6b16-42d4-9118-a1d22b6bccfb, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:32 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=18.244, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234435, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=3da9007d-6b16-42d4-9118-a1d22b6bccfb, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:30 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"3da9007d-6b16-42d4-9118-a1d22b6bccfb","requestLatencyInMs":601,"requestStartTimeUTC":"2026-04-16T23:49:30.706724300Z","requestEndTimeUTC":"2026-04-16T23:49:31.308046400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:30.707967600Z","durationInMilliSecs":468.5958},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:31.176563400Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:31.176563400Z","durationInMilliSecs":2.5253},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:31.179088700Z","durationInMilliSecs":127.7848},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:31.306873500Z","durationInMilliSecs":0.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 3da9007d-6b16-42d4-9118-a1d22b6bccfb, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:32 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=18.244, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234435, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=3da9007d-6b16-42d4-9118-a1d22b6bccfb, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"4e88e961/1","parentChannelId":"4e88e961","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"22288 KB","availableMemory":"12486896 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":10,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
Click to show all stack frames +
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 3da9007d-6b16-42d4-9118-a1d22b6bccfb, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 3da9007d-6b16-42d4-9118-a1d22b6bccfb, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:32 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=18.244, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234435, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=3da9007d-6b16-42d4-9118-a1d22b6bccfb, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:30 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"3da9007d-6b16-42d4-9118-a1d22b6bccfb","requestLatencyInMs":601,"requestStartTimeUTC":"2026-04-16T23:49:30.706724300Z","requestEndTimeUTC":"2026-04-16T23:49:31.308046400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:30.707967600Z","durationInMilliSecs":468.5958},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:31.176563400Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:31.176563400Z","durationInMilliSecs":2.5253},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:31.179088700Z","durationInMilliSecs":127.7848},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:31.306873500Z","durationInMilliSecs":0.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 3da9007d-6b16-42d4-9118-a1d22b6bccfb, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:32 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=18.244, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234435, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=3da9007d-6b16-42d4-9118-a1d22b6bccfb, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"4e88e961/1","parentChannelId":"4e88e961","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"22288 KB","availableMemory":"12486896 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":10,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientBulk
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: d5a97abf-7b00-4001-82ca-f6d4cad418ac, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: d5a97abf-7b00-4001-82ca-f6d4cad418ac, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:20 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=20.305, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134340, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=d5a97abf-7b00-4001-82ca-f6d4cad418ac, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:18 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"d5a97abf-7b00-4001-82ca-f6d4cad418ac","requestLatencyInMs":565,"requestStartTimeUTC":"2026-04-16T23:49:18.683685900Z","requestEndTimeUTC":"2026-04-16T23:49:19.249090Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:18.683685900Z","durationInMilliSecs":440.923},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:19.124608900Z","durationInMilliSecs":0.9974},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:19.125606300Z","durationInMilliSecs":0.9994},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:19.126605700Z","durationInMilliSecs":121.4827},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:19.248088400Z","durationInMilliSecs":1.0016}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: d5a97abf-7b00-4001-82ca-f6d4cad418ac, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:20 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=20.305, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134340, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=d5a97abf-7b00-4001-82ca-f6d4cad418ac, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"e6de7559/1","parentChannelId":"e6de7559","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"22727 KB","availableMemory":"12486457 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":4,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
Click to show all stack frames +
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: d5a97abf-7b00-4001-82ca-f6d4cad418ac, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: d5a97abf-7b00-4001-82ca-f6d4cad418ac, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:20 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=20.305, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134340, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=d5a97abf-7b00-4001-82ca-f6d4cad418ac, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:18 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"d5a97abf-7b00-4001-82ca-f6d4cad418ac","requestLatencyInMs":565,"requestStartTimeUTC":"2026-04-16T23:49:18.683685900Z","requestEndTimeUTC":"2026-04-16T23:49:19.249090Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:18.683685900Z","durationInMilliSecs":440.923},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:19.124608900Z","durationInMilliSecs":0.9974},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:19.125606300Z","durationInMilliSecs":0.9994},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:19.126605700Z","durationInMilliSecs":121.4827},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:19.248088400Z","durationInMilliSecs":1.0016}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: d5a97abf-7b00-4001-82ca-f6d4cad418ac, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:20 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=20.305, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134340, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=d5a97abf-7b00-4001-82ca-f6d4cad418ac, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"e6de7559/1","parentChannelId":"e6de7559","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"22288 KB","availableMemory":"12486896 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":4,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientQuery
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 61c54bb3-2138-48fb-aab7-011d23e7b470, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 61c54bb3-2138-48fb-aab7-011d23e7b470, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:38 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=29.525, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=130033, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=61c54bb3-2138-48fb-aab7-011d23e7b470, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:36 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"61c54bb3-2138-48fb-aab7-011d23e7b470","requestLatencyInMs":757,"requestStartTimeUTC":"2026-04-16T23:49:36.576064900Z","requestEndTimeUTC":"2026-04-16T23:49:37.333931500Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:36.577061500Z","durationInMilliSecs":615.2329},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:37.192294400Z","durationInMilliSecs":1.4507},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:37.193745100Z","durationInMilliSecs":2.0124},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:37.195757500Z","durationInMilliSecs":135.6595},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:37.331417Z","durationInMilliSecs":1.5054}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 61c54bb3-2138-48fb-aab7-011d23e7b470, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:38 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=29.525, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=130033, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=61c54bb3-2138-48fb-aab7-011d23e7b470, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"37e52409/1","parentChannelId":"37e52409","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"22727 KB","availableMemory":"12486457 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":14,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
Click to show all stack frames +
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 61c54bb3-2138-48fb-aab7-011d23e7b470, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 61c54bb3-2138-48fb-aab7-011d23e7b470, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:38 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=29.525, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=130033, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=61c54bb3-2138-48fb-aab7-011d23e7b470, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:36 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"61c54bb3-2138-48fb-aab7-011d23e7b470","requestLatencyInMs":757,"requestStartTimeUTC":"2026-04-16T23:49:36.576064900Z","requestEndTimeUTC":"2026-04-16T23:49:37.333931500Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:36.577061500Z","durationInMilliSecs":615.2329},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:37.192294400Z","durationInMilliSecs":1.4507},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:37.193745100Z","durationInMilliSecs":2.0124},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:37.195757500Z","durationInMilliSecs":135.6595},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:37.331417Z","durationInMilliSecs":1.5054}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 61c54bb3-2138-48fb-aab7-011d23e7b470, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:38 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=29.525, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=130033, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=61c54bb3-2138-48fb-aab7-011d23e7b470, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"37e52409/1","parentChannelId":"37e52409","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"22727 KB","availableMemory":"12486457 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":14,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
+	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
+	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
+	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
+	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
+	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
+	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
+	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
+	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
+	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
+	at java.base/java.lang.Thread.run(Thread.java:833)
+	Suppressed: java.lang.Exception: #block terminated with an error
+		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
+		at reactor.core.publisher.Mono.block(Mono.java:1779)
+		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74)
+		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
+		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
+		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
+		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
+		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
+		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
+		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
+		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
+		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
+		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
+		at org.testng.TestRunner.privateRun(TestRunner.java:808)
+		at org.testng.TestRunner.run(TestRunner.java:603)
+		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
+		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
+		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
+		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
+		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
+		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
+		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
+		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
+		at org.testng.TestNG.runSuites(TestNG.java:1092)
+		at org.testng.TestNG.run(TestNG.java:1060)
+		at org.testng.TestNG.privateMain(TestNG.java:1403)
+		at org.testng.TestNG.main(TestNG.java:1367)
+
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e

+ + \ No newline at end of file diff --git a/test-output/Command line suite/Command line test.xml b/test-output/Command line suite/Command line test.xml new file mode 100644 index 000000000000..f9bc520c03e1 --- /dev/null +++ b/test-output/Command line suite/Command line test.xml @@ -0,0 +1,274 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-output/Command line suite/testng-failed.xml b/test-output/Command line suite/testng-failed.xml new file mode 100644 index 000000000000..3737295542f1 --- /dev/null +++ b/test-output/Command line suite/testng-failed.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-output/bullet_point.png b/test-output/bullet_point.png new file mode 100644 index 0000000000000000000000000000000000000000..176e6d5b3d64d032e76c493e5811a1cf839220b5 GIT binary patch literal 356 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9GG!XV7ZFl&wkP>?0v z(btiIVPjv-@4(4GzCyA`kS_y6l_~>6Lo)-z&;LOBB?CjL0RzLU1O^7H84L{K`IF+0 zx&hVR@^o z&n}1RKn7{UjfWZCs($|cfA#bKkH7!F`St(Z@BiQa{{Qv=|DXRL zz<>l4f3h$#FmN;IfW$y%FtB(Pob+71*X+evXI>YLE;&}Fj8#mRE%&W?B30shyu13% zpT6C#3k-fJGjKF52@24V6I?%GvcZa|)%y<^9(-F=IB9W`k6g3(YLhfsMh0sDZC^x! literal 0 HcmV?d00001 diff --git a/test-output/emailable-report.html b/test-output/emailable-report.html new file mode 100644 index 000000000000..411879fe3ca5 --- /dev/null +++ b/test-output/emailable-report.html @@ -0,0 +1,317 @@ + + + + +TestNG Report + + + + + + + +
Test# Passed# Skipped# Retried# FailedTime (ms)Included GroupsExcluded Groups
Command line suite
Command line test0010526,493thinclient
+ +
ClassMethodStartTime (ms)
Command line suite
Command line test — failed
com.azure.cosmos.implementation.ThinClientE2ETesttestThinClientBatch17763833186101347
testThinClientBulk17763833224811304
testThinClientDocumentPointOperations17763833292082457
testThinClientIncrementalChangeFeed17763833341461362
testThinClientQuery17763833379571252
Command line test — retried
com.azure.cosmos.implementation.ThinClientE2ETesttestThinClientBatch17763833127394526
testThinClientBatch
testThinClientBulk17763833212061273
testThinClientBulk
testThinClientDocumentPointOperations17763833265472660
testThinClientDocumentPointOperations
testThinClientIncrementalChangeFeed17763833329481197
testThinClientIncrementalChangeFeed
testThinClientQuery17763833355081249
testThinClientQuery
+

Command line test

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientBatch

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 4ce5124c-3ea1-4f70-a6fe-c51d4de4778b, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 4ce5124c-3ea1-4f70-a6fe-c51d4de4778b, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:40 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=29.855, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=240521, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=4ce5124c-3ea1-4f70-a6fe-c51d4de4778b, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:39 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"4ce5124c-3ea1-4f70-a6fe-c51d4de4778b","requestLatencyInMs":622,"requestStartTimeUTC":"2026-04-16T23:48:39.332992900Z","requestEndTimeUTC":"2026-04-16T23:48:39.955473200Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:39.333999900Z","durationInMilliSecs":484.4468},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:39.818446700Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:39.818446700Z","durationInMilliSecs":1.171},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:39.819617700Z","durationInMilliSecs":133.8428},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:39.953460500Z","durationInMilliSecs":1.0076}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 4ce5124c-3ea1-4f70-a6fe-c51d4de4778b, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:40 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=29.855, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=240521, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=4ce5124c-3ea1-4f70-a6fe-c51d4de4778b, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"7c6f1242/1","parentChannelId":"7c6f1242","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"34394 KB","availableMemory":"12474790 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":3,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} + at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) + at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) + at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) + at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) + at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) + at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:833) + Suppressed: java.lang.Exception: #block terminated with an error + at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) + at reactor.core.publisher.Mono.block(Mono.java:1779) + at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) +... Removed 24 stack frames

back to summary

+

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientBulk

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 0fa62038-5a61-4ed7-9473-a7c31e63bde9, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 0fa62038-5a61-4ed7-9473-a7c31e63bde9, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:44 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=31.025, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234414, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=0fa62038-5a61-4ed7-9473-a7c31e63bde9, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:43 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"0fa62038-5a61-4ed7-9473-a7c31e63bde9","requestLatencyInMs":698,"requestStartTimeUTC":"2026-04-16T23:48:43.084310600Z","requestEndTimeUTC":"2026-04-16T23:48:43.783290400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:43.085327200Z","durationInMilliSecs":528.8975},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:43.614224700Z","durationInMilliSecs":0.9985},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:43.615223200Z","durationInMilliSecs":2.0099},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:43.617233100Z","durationInMilliSecs":164.0474},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:43.781280500Z","durationInMilliSecs":1.0206}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 0fa62038-5a61-4ed7-9473-a7c31e63bde9, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:44 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=31.025, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234414, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=0fa62038-5a61-4ed7-9473-a7c31e63bde9, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"4708792e/1","parentChannelId":"4708792e","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"34831 KB","availableMemory":"12474353 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":6,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} + at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) + at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) + at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) + at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) + at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) + at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:833) + Suppressed: java.lang.Exception: #block terminated with an error + at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) + at reactor.core.publisher.Mono.block(Mono.java:1779) + at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) +... Removed 24 stack frames

back to summary

+

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientDocumentPointOperations

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: dc57288f-6b34-489b-93ee-f2571c376c5f, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: dc57288f-6b34-489b-93ee-f2571c376c5f, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:52 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=dc57288f-6b34-489b-93ee-f2571c376c5f, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:48:50 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"dc57288f-6b34-489b-93ee-f2571c376c5f","requestLatencyInMs":683,"requestStartTimeUTC":"2026-04-16T23:48:50.980473300Z","requestEndTimeUTC":"2026-04-16T23:48:51.664239900Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:48:50.980473300Z","endTimeUTC":"2026-04-16T23:48:50.980473300Z","durationInMilliSecs":0.0}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:50.981473300Z","durationInMilliSecs":483.2608},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:51.464734100Z","durationInMilliSecs":1.0001},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:51.465734200Z","durationInMilliSecs":1.5523},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:51.467286500Z","durationInMilliSecs":194.9529},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:51.662239400Z","durationInMilliSecs":1.0003}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: dc57288f-6b34-489b-93ee-f2571c376c5f, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:52 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=dc57288f-6b34-489b-93ee-f2571c376c5f, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"56096bc6/1","parentChannelId":"56096bc6","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"34831 KB","availableMemory":"12474353 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":9,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} + at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) + at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) + at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) + at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) + at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) + at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:833) + Suppressed: java.lang.Exception: #block terminated with an error + at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) + at reactor.core.publisher.Mono.block(Mono.java:1779) + at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) +... Removed 24 stack frames

back to summary

+

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientIncrementalChangeFeed

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: d02d2aab-b175-42af-b979-bd343b5ec5a1, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: d02d2aab-b175-42af-b979-bd343b5ec5a1, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:56 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=17.066, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234421, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=d02d2aab-b175-42af-b979-bd343b5ec5a1, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:54 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"d02d2aab-b175-42af-b979-bd343b5ec5a1","requestLatencyInMs":621,"requestStartTimeUTC":"2026-04-16T23:48:54.884982700Z","requestEndTimeUTC":"2026-04-16T23:48:55.506066800Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:54.886058100Z","durationInMilliSecs":471.2518},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:55.357309900Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:55.357309900Z","durationInMilliSecs":1.5067},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:55.358816600Z","durationInMilliSecs":145.7432},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:55.504559800Z","durationInMilliSecs":1.0011}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: d02d2aab-b175-42af-b979-bd343b5ec5a1, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:56 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=17.066, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234421, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=d02d2aab-b175-42af-b979-bd343b5ec5a1, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"f367e4f5/1","parentChannelId":"f367e4f5","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"34831 KB","availableMemory":"12474353 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":12,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} + at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) + at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) + at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) + at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) + at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) + at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:833) + Suppressed: java.lang.Exception: #block terminated with an error + at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) + at reactor.core.publisher.Mono.block(Mono.java:1779) + at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) +... Removed 24 stack frames

back to summary

+

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientQuery

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: cf4d2b87-cbf4-4a0a-b3c9-a5547c888d90, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: cf4d2b87-cbf4-4a0a-b3c9-a5547c888d90, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:59 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=12.876, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234423, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=cf4d2b87-cbf4-4a0a-b3c9-a5547c888d90, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:58 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"cf4d2b87-cbf4-4a0a-b3c9-a5547c888d90","requestLatencyInMs":663,"requestStartTimeUTC":"2026-04-16T23:48:58.543548300Z","requestEndTimeUTC":"2026-04-16T23:48:59.206604900Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:58.543548300Z","durationInMilliSecs":531.1243},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:59.074672600Z","durationInMilliSecs":1.3653},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:59.076037900Z","durationInMilliSecs":0.0},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:59.076037900Z","durationInMilliSecs":128.5573},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:59.204595200Z","durationInMilliSecs":1.1044}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: cf4d2b87-cbf4-4a0a-b3c9-a5547c888d90, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:59 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=12.876, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234423, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=cf4d2b87-cbf4-4a0a-b3c9-a5547c888d90, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"598c6834/1","parentChannelId":"598c6834","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"35280 KB","availableMemory":"12473904 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":15,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} + at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) + at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) + at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) + at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) + at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) + at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:833) + Suppressed: java.lang.Exception: #block terminated with an error + at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) + at reactor.core.publisher.Mono.block(Mono.java:1779) + at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) +... Removed 24 stack frames

back to summary

+

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientBatch

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 0b47177c-b4df-43f7-9811-b2bc0a5ed7b9, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 0b47177c-b4df-43f7-9811-b2bc0a5ed7b9, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:37 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=10.819, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=280845, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=0b47177c-b4df-43f7-9811-b2bc0a5ed7b9, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:36 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"0b47177c-b4df-43f7-9811-b2bc0a5ed7b9","requestLatencyInMs":836,"requestStartTimeUTC":"2026-04-16T23:48:36.388735Z","requestEndTimeUTC":"2026-04-16T23:48:37.225571900Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:36.391759600Z","durationInMilliSecs":701.7473},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:37.093506900Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:37.093506900Z","durationInMilliSecs":1.0109},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:37.094517800Z","durationInMilliSecs":124.0545},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:37.218572300Z","durationInMilliSecs":1.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 0b47177c-b4df-43f7-9811-b2bc0a5ed7b9, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:37 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=10.819, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=280845, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=0b47177c-b4df-43f7-9811-b2bc0a5ed7b9, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"c793ec46/1","parentChannelId":"c793ec46","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"35280 KB","availableMemory":"12473904 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":1,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} + at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) + at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) + at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) + at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) + at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) + at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:833) + Suppressed: java.lang.Exception: #block terminated with an error + at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) + at reactor.core.publisher.Mono.block(Mono.java:1779) + at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) +... Removed 24 stack frames

back to summary

+

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientBatch

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: f3e0bbf0-e156-45a2-b992-3445f4f1d6bd, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: f3e0bbf0-e156-45a2-b992-3445f4f1d6bd, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:39 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=27.741, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234412, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=f3e0bbf0-e156-45a2-b992-3445f4f1d6bd, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:37 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"f3e0bbf0-e156-45a2-b992-3445f4f1d6bd","requestLatencyInMs":676,"requestStartTimeUTC":"2026-04-16T23:48:37.929845200Z","requestEndTimeUTC":"2026-04-16T23:48:38.606156200Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:37.929845200Z","durationInMilliSecs":453.2505},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:38.383095700Z","durationInMilliSecs":1.0053},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:38.384101Z","durationInMilliSecs":0.0},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:38.384101Z","durationInMilliSecs":218.8253},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:38.602926300Z","durationInMilliSecs":2.0081}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: f3e0bbf0-e156-45a2-b992-3445f4f1d6bd, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:39 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=27.741, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234412, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=f3e0bbf0-e156-45a2-b992-3445f4f1d6bd, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"32956711/1","parentChannelId":"32956711","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"35727 KB","availableMemory":"12473457 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":2,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} + at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) + at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) + at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) + at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) + at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) + at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:833) + Suppressed: java.lang.Exception: #block terminated with an error + at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) + at reactor.core.publisher.Mono.block(Mono.java:1779) + at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) +... Removed 24 stack frames

back to summary

+

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientBulk

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 44f74e10-4be7-486e-9360-bc3b6214cb57, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 44f74e10-4be7-486e-9360-bc3b6214cb57, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:43 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=20.934, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=231740, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=44f74e10-4be7-486e-9360-bc3b6214cb57, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:41 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"44f74e10-4be7-486e-9360-bc3b6214cb57","requestLatencyInMs":719,"requestStartTimeUTC":"2026-04-16T23:48:41.759068800Z","requestEndTimeUTC":"2026-04-16T23:48:42.478218800Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:41.759068800Z","durationInMilliSecs":546.807},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:42.305875800Z","durationInMilliSecs":1.318},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:42.307193800Z","durationInMilliSecs":1.0176},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:42.308211400Z","durationInMilliSecs":167.4951},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:42.475706500Z","durationInMilliSecs":1.5053}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 44f74e10-4be7-486e-9360-bc3b6214cb57, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:43 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=20.934, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=231740, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=44f74e10-4be7-486e-9360-bc3b6214cb57, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"817172af/1","parentChannelId":"817172af","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"35727 KB","availableMemory":"12473457 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":5,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} + at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) + at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) + at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) + at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) + at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) + at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:833) + Suppressed: java.lang.Exception: #block terminated with an error + at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) + at reactor.core.publisher.Mono.block(Mono.java:1779) + at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) +... Removed 24 stack frames

back to summary

+

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientBulk

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: ab1311b3-318f-4474-b959-6a0acf4fd966, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: ab1311b3-318f-4474-b959-6a0acf4fd966, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:42 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=28.942, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=237237, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=ab1311b3-318f-4474-b959-6a0acf4fd966, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:40 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"ab1311b3-318f-4474-b959-6a0acf4fd966","requestLatencyInMs":612,"requestStartTimeUTC":"2026-04-16T23:48:40.582060Z","requestEndTimeUTC":"2026-04-16T23:48:41.194815200Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:40.583053700Z","durationInMilliSecs":479.3876},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:41.062441300Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:41.062441300Z","durationInMilliSecs":2.0021},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:41.064443400Z","durationInMilliSecs":127.3234},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:41.191766800Z","durationInMilliSecs":2.0086}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: ab1311b3-318f-4474-b959-6a0acf4fd966, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:42 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=28.942, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=237237, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=ab1311b3-318f-4474-b959-6a0acf4fd966, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"09bdb406/1","parentChannelId":"09bdb406","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"35727 KB","availableMemory":"12473457 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":4,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} + at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) + at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) + at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) + at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) + at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) + at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:833) + Suppressed: java.lang.Exception: #block terminated with an error + at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) + at reactor.core.publisher.Mono.block(Mono.java:1779) + at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) +... Removed 24 stack frames

back to summary

+

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientDocumentPointOperations

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: 7c0b99fd-2248-4d04-a28b-384b88ad9628, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 7c0b99fd-2248-4d04-a28b-384b88ad9628, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:49 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=7c0b99fd-2248-4d04-a28b-384b88ad9628, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:48:48 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"7c0b99fd-2248-4d04-a28b-384b88ad9628","requestLatencyInMs":655,"requestStartTimeUTC":"2026-04-16T23:48:48.548799Z","requestEndTimeUTC":"2026-04-16T23:48:49.203810800Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:48:48.549815900Z","endTimeUTC":"2026-04-16T23:48:48.550828900Z","durationInMilliSecs":1.013}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:48.551839600Z","durationInMilliSecs":447.0778},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:48.998917400Z","durationInMilliSecs":1.0291},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:48.999946500Z","durationInMilliSecs":1.9986},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:49.001945100Z","durationInMilliSecs":197.8683},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:49.199813400Z","durationInMilliSecs":0.9965}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 7c0b99fd-2248-4d04-a28b-384b88ad9628, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:49 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=7c0b99fd-2248-4d04-a28b-384b88ad9628, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"77fc9838/1","parentChannelId":"77fc9838","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"36170 KB","availableMemory":"12473014 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":8,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} + at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) + at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) + at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) + at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) + at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) + at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:833) + Suppressed: java.lang.Exception: #block terminated with an error + at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) + at reactor.core.publisher.Mono.block(Mono.java:1779) + at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) +... Removed 24 stack frames

back to summary

+

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientDocumentPointOperations

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: f6c8fa96-915a-4c58-bde7-bc5395a38fbd, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: f6c8fa96-915a-4c58-bde7-bc5395a38fbd, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:47 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=f6c8fa96-915a-4c58-bde7-bc5395a38fbd, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:48:45 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"f6c8fa96-915a-4c58-bde7-bc5395a38fbd","requestLatencyInMs":760,"requestStartTimeUTC":"2026-04-16T23:48:45.772415400Z","requestEndTimeUTC":"2026-04-16T23:48:46.533097100Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:48:45.773013200Z","endTimeUTC":"2026-04-16T23:48:45.776021400Z","durationInMilliSecs":3.0082}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:45.780020500Z","durationInMilliSecs":543.6743},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:46.323694800Z","durationInMilliSecs":0.995},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:46.324689800Z","durationInMilliSecs":4.0011},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:46.328690900Z","durationInMilliSecs":192.8744},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:46.521565300Z","durationInMilliSecs":0.9997}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: f6c8fa96-915a-4c58-bde7-bc5395a38fbd, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:47 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=f6c8fa96-915a-4c58-bde7-bc5395a38fbd, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"0c3fee42/1","parentChannelId":"0c3fee42","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"36170 KB","availableMemory":"12473014 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":7,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} + at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) + at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) + at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) + at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) + at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) + at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:833) + Suppressed: java.lang.Exception: #block terminated with an error + at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) + at reactor.core.publisher.Mono.block(Mono.java:1779) + at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) +... Removed 24 stack frames

back to summary

+

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientIncrementalChangeFeed

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: a8d2cea1-23d9-4d07-ae87-412132f729fe, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a8d2cea1-23d9-4d07-ae87-412132f729fe, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:55 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=28.08, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=273617, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a8d2cea1-23d9-4d07-ae87-412132f729fe, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:53 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"a8d2cea1-23d9-4d07-ae87-412132f729fe","requestLatencyInMs":668,"requestStartTimeUTC":"2026-04-16T23:48:53.475059900Z","requestEndTimeUTC":"2026-04-16T23:48:54.143448300Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:53.475059900Z","durationInMilliSecs":466.2609},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:53.941320800Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:53.941320800Z","durationInMilliSecs":1.0166},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:53.942337400Z","durationInMilliSecs":198.1097},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:54.140447100Z","durationInMilliSecs":1.0599}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a8d2cea1-23d9-4d07-ae87-412132f729fe, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:55 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=28.08, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=273617, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a8d2cea1-23d9-4d07-ae87-412132f729fe, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"1a30e0c8/1","parentChannelId":"1a30e0c8","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"36170 KB","availableMemory":"12473014 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":11,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} + at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) + at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) + at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) + at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) + at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) + at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:833) + Suppressed: java.lang.Exception: #block terminated with an error + at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) + at reactor.core.publisher.Mono.block(Mono.java:1779) + at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) +... Removed 24 stack frames

back to summary

+

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientIncrementalChangeFeed

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: c95b1753-1617-488c-93ec-2da6778ed0bd, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: c95b1753-1617-488c-93ec-2da6778ed0bd, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:53 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=16.899, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=269717, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=c95b1753-1617-488c-93ec-2da6778ed0bd, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:52 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"c95b1753-1617-488c-93ec-2da6778ed0bd","requestLatencyInMs":656,"requestStartTimeUTC":"2026-04-16T23:48:52.287741400Z","requestEndTimeUTC":"2026-04-16T23:48:52.944144100Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:52.288850100Z","durationInMilliSecs":452.8209},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:52.741671Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:52.741671Z","durationInMilliSecs":1.097},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:52.742768Z","durationInMilliSecs":200.3781},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:52.943146100Z","durationInMilliSecs":0.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: c95b1753-1617-488c-93ec-2da6778ed0bd, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:53 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=16.899, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=269717, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=c95b1753-1617-488c-93ec-2da6778ed0bd, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"32fd8282/1","parentChannelId":"32fd8282","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"36638 KB","availableMemory":"12472546 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":10,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} + at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) + at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) + at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) + at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) + at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) + at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:833) + Suppressed: java.lang.Exception: #block terminated with an error + at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) + at reactor.core.publisher.Mono.block(Mono.java:1779) + at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) +... Removed 24 stack frames

back to summary

+

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientQuery

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: cea76829-4b46-4319-9c1a-34b54fa2f505, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: cea76829-4b46-4319-9c1a-34b54fa2f505, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:57 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=17.795, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134337, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=cea76829-4b46-4319-9c1a-34b54fa2f505, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:56 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"cea76829-4b46-4319-9c1a-34b54fa2f505","requestLatencyInMs":596,"requestStartTimeUTC":"2026-04-16T23:48:56.159256700Z","requestEndTimeUTC":"2026-04-16T23:48:56.755409700Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:56.159256700Z","durationInMilliSecs":463.4909},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:56.622747600Z","durationInMilliSecs":1.43},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:56.624177600Z","durationInMilliSecs":0.0},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:56.624177600Z","durationInMilliSecs":129.8336},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:56.754011200Z","durationInMilliSecs":1.3985}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: cea76829-4b46-4319-9c1a-34b54fa2f505, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:57 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=17.795, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134337, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=cea76829-4b46-4319-9c1a-34b54fa2f505, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"88e0d729/1","parentChannelId":"88e0d729","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"36638 KB","availableMemory":"12472546 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":13,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} + at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) + at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) + at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) + at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) + at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) + at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:833) + Suppressed: java.lang.Exception: #block terminated with an error + at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) + at reactor.core.publisher.Mono.block(Mono.java:1779) + at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) +... Removed 24 stack frames

back to summary

+

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientQuery

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 0904c85b-9bbe-4c5b-be9d-b58f18729c11, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 0904c85b-9bbe-4c5b-be9d-b58f18729c11, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:58 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=25.908, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234422, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=0904c85b-9bbe-4c5b-be9d-b58f18729c11, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:57 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"0904c85b-9bbe-4c5b-be9d-b58f18729c11","requestLatencyInMs":595,"requestStartTimeUTC":"2026-04-16T23:48:57.358787900Z","requestEndTimeUTC":"2026-04-16T23:48:57.954284600Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:57.359388400Z","durationInMilliSecs":464.1591},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:57.823547500Z","durationInMilliSecs":1.4824},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:57.825029900Z","durationInMilliSecs":0.5932},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:57.825623100Z","durationInMilliSecs":126.6546},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:57.952277700Z","durationInMilliSecs":1.0072}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 0904c85b-9bbe-4c5b-be9d-b58f18729c11, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:58 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=25.908, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234422, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=0904c85b-9bbe-4c5b-be9d-b58f18729c11, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"5424b6d5/1","parentChannelId":"5424b6d5","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"36638 KB","availableMemory":"12472546 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":14,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} + at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) + at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) + at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) + at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) + at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) + at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) + at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) + at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) + at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) + at java.base/java.lang.Thread.run(Thread.java:833) + Suppressed: java.lang.Exception: #block terminated with an error + at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) + at reactor.core.publisher.Mono.block(Mono.java:1779) + at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74) + at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) +... Removed 24 stack frames

back to summary

+ + diff --git a/test-output/failed.png b/test-output/failed.png new file mode 100644 index 0000000000000000000000000000000000000000..c117be59a9ecd1da15ebf48f6b7f53496302a7cd GIT binary patch literal 977 zcmV;?11|iDP)4Tx0C)j~RNrgUP!#^!Wu36$i#lf!2|j3%Ze&w*L!7p2SGvtw>Nd9_NSmf@ zT$;ut?S8Na*^6&F#dq-sKKTa>*@JI;k`2ZbVfd_wB24xov!0tYO(#d#()tZ$I5%3%!zLYh@BH>w}XODA7?mkV}ap}jU$$3 zG&Mk)3Bm`(LOM&hKscCb;PVaG&Vdx+MpZJHTQ(R_;DA31$+jOGBoLXk_De?ey1m!ik&_4G zH9n^))_*|$z4!HUisgBd@awc5jn(v9k~&t~+vLrrBg4dZQ9lDnLV}JQWGLW~LJVP= zW5lZXOcog;N~F?hbX0k=IMzETla}oqM|jC!4!B+x^;@#I_Tc-T-6hwKycLDTx1-om z?X`jFy0R0R8-I0SrK4`)H@W4T8*Qr#2vPou<*`U!Wy(*2QP*`g=8#jD{B;Y@GL-Hm zb`n?&x~%YC_$q7)PlXr4m%r4=&fcvN%Ybn#KC7Nn&Bp8{(oE9pWVpYI^+LuN`H(R~ zTAjWmO`M83^4d@fCkA(d>*nHIFV_d2yUbnT`nd?LE^;G|!WZ>Ld?E0@Grm4ww{M7H zr`x{MWb30bTI;*hk-DO>dX$gbC-yy#suLNqvA(f>RtPJ!qGM`Gvvf}Y10`)vm-7Xa z?-7Ixe2A_siI1ydSCCID3U8SVUY86>uSnT0use_K1GZDvUFKY)t}F* z)!pahe+zh{{06Bb3f97*Uorpy0B%V{K~yLeW4y>F|DS;bz(j&tuu`}Ny`K+o>P41= zYq-R&z$-w|z14sZ}6S`uM8b)lMhS`K{GDtB9px6Kr!cSsofH?!*c`##8 zG{6+YB(Z6NYd}|wOA}U4!xUqq;Wl8C#3lv+hIuOk>aOmJ00000NkvXXu0mjfn+D0# literal 0 HcmV?d00001 diff --git a/test-output/index.html b/test-output/index.html new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test-output/jquery.min.js b/test-output/jquery.min.js new file mode 100644 index 000000000000..b0614034ad3a --- /dev/null +++ b/test-output/jquery.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-output/junitreports/TEST-com.azure.cosmos.implementation.ConsistencyFlagContentionTest.xml b/test-output/junitreports/TEST-com.azure.cosmos.implementation.ConsistencyFlagContentionTest.xml new file mode 100644 index 000000000000..889610ae08d3 --- /dev/null +++ b/test-output/junitreports/TEST-com.azure.cosmos.implementation.ConsistencyFlagContentionTest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientE2ETest.xml b/test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientE2ETest.xml new file mode 100644 index 000000000000..95fcc7944245 --- /dev/null +++ b/test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientE2ETest.xml @@ -0,0 +1,289 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientReadConsistencyStrategyE2ETest.xml b/test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientReadConsistencyStrategyE2ETest.xml new file mode 100644 index 000000000000..7bb9e681c684 --- /dev/null +++ b/test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientReadConsistencyStrategyE2ETest.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-output/navigator-bullet.png b/test-output/navigator-bullet.png new file mode 100644 index 0000000000000000000000000000000000000000..36d90d395c51912e718b89dd88b4a3fb53aa1d85 GIT binary patch literal 352 zcmV-m0iXVfP)G5@hw44>$jtc^drBsEhr7 z^X9?-KzfCWMC0vWtek#CBxB+XG+nX0$0e)!py)g%*!C9F3xb^$q9zV zJJ-RS;)J3Q3>X<0IJnsvq?E-OUUR%-Sh{}$*!>`a1>MbzjEoGd?5qriD%uRz5+)#_ z=~xvqF)}e2@@p|@3aYFDDdOf=+lQf0fP;_0P2842gi~-LkXsB?^cOvN)>U@o{(tlO y5-4a&(SrsYdr*b0AjKdWn<5ZqBsQ)A0t^5xc9&6bK}yU30000 + +Class name +Method name +Groups + +com.azure.cosmos.implementation.ThinClientE2ETest +   + +@Test + + +  +testThinClientIncrementalChangeFeed +thinclient + + +  +testThinClientBatch +thinclient + + +  +testThinClientDocumentPointOperations +thinclient + + +  +testThinClientBulk +thinclient + + +  +testThinClientQuery +thinclient + + +@BeforeClass + + +@BeforeMethod + + +@AfterMethod + + +@AfterClass + + diff --git a/test-output/old/Command line suite/groups.html b/test-output/old/Command line suite/groups.html new file mode 100644 index 000000000000..e30a4cb58070 --- /dev/null +++ b/test-output/old/Command line suite/groups.html @@ -0,0 +1,3 @@ +

Groups used for this test run

+ +
Group nameMethods
thinclientThinClientE2ETest.testThinClientIncrementalChangeFeed()[pri:0, instance:com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e]
ThinClientE2ETest.testThinClientQuery()[pri:0, instance:com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e]
ThinClientE2ETest.testThinClientBatch()[pri:0, instance:com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e]
ThinClientE2ETest.testThinClientDocumentPointOperations()[pri:0, instance:com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e]
ThinClientE2ETest.testThinClientBulk()[pri:0, instance:com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e]
diff --git a/test-output/old/Command line suite/index.html b/test-output/old/Command line suite/index.html new file mode 100644 index 000000000000..3577bd28a9f6 --- /dev/null +++ b/test-output/old/Command line suite/index.html @@ -0,0 +1,6 @@ +Results for Command line suite + + + + + diff --git a/test-output/old/Command line suite/main.html b/test-output/old/Command line suite/main.html new file mode 100644 index 000000000000..0ee4b5b499ac --- /dev/null +++ b/test-output/old/Command line suite/main.html @@ -0,0 +1,2 @@ +Results for Command line suite +Select a result on the left-hand pane. diff --git a/test-output/old/Command line suite/methods-alphabetical.html b/test-output/old/Command line suite/methods-alphabetical.html new file mode 100644 index 000000000000..a3acc0beb0dd --- /dev/null +++ b/test-output/old/Command line suite/methods-alphabetical.html @@ -0,0 +1,34 @@ +

Methods run, sorted chronologically

>> means before, << means after


Command line suite

(Hover the method name to see the test class name)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
26/04/16 19:49:16 0      testThinClientBatchmain@1510467688
26/04/16 19:49:16 0      testThinClientBatchmain@1510467688
26/04/16 19:49:16 0      testThinClientBatchmain@1510467688
26/04/16 19:49:20 3754      testThinClientBulkmain@1510467688
26/04/16 19:49:20 3754      testThinClientBulkmain@1510467688
26/04/16 19:49:20 3754      testThinClientBulkmain@1510467688
26/04/16 19:49:27 10555      testThinClientDocumentPointOperationsmain@1510467688
26/04/16 19:49:27 10555      testThinClientDocumentPointOperationsmain@1510467688
26/04/16 19:49:27 10555      testThinClientDocumentPointOperationsmain@1510467688
26/04/16 19:49:32 15904      testThinClientIncrementalChangeFeedmain@1510467688
26/04/16 19:49:32 15904      testThinClientIncrementalChangeFeedmain@1510467688
26/04/16 19:49:32 15904      testThinClientIncrementalChangeFeedmain@1510467688
26/04/16 19:49:37 20506      testThinClientQuerymain@1510467688
26/04/16 19:49:37 20506      testThinClientQuerymain@1510467688
26/04/16 19:49:37 20506      testThinClientQuerymain@1510467688
diff --git a/test-output/old/Command line suite/methods-not-run.html b/test-output/old/Command line suite/methods-not-run.html new file mode 100644 index 000000000000..54b14cb854b6 --- /dev/null +++ b/test-output/old/Command line suite/methods-not-run.html @@ -0,0 +1,2 @@ +

Methods that were not run

+
\ No newline at end of file diff --git a/test-output/old/Command line suite/methods.html b/test-output/old/Command line suite/methods.html new file mode 100644 index 000000000000..ef15b17dad39 --- /dev/null +++ b/test-output/old/Command line suite/methods.html @@ -0,0 +1,34 @@ +

Methods run, sorted chronologically

>> means before, << means after


Command line suite

(Hover the method name to see the test class name)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
26/04/16 19:49:16 0      testThinClientBatchmain@1510467688
26/04/16 19:49:27 10555      testThinClientDocumentPointOperationsmain@1510467688
26/04/16 19:49:16 0      testThinClientBatchmain@1510467688
26/04/16 19:49:20 3754      testThinClientBulkmain@1510467688
26/04/16 19:49:16 0      testThinClientBatchmain@1510467688
26/04/16 19:49:32 15904      testThinClientIncrementalChangeFeedmain@1510467688
26/04/16 19:49:20 3754      testThinClientBulkmain@1510467688
26/04/16 19:49:37 20506      testThinClientQuerymain@1510467688
26/04/16 19:49:27 10555      testThinClientDocumentPointOperationsmain@1510467688
26/04/16 19:49:37 20506      testThinClientQuerymain@1510467688
26/04/16 19:49:27 10555      testThinClientDocumentPointOperationsmain@1510467688
26/04/16 19:49:20 3754      testThinClientBulkmain@1510467688
26/04/16 19:49:32 15904      testThinClientIncrementalChangeFeedmain@1510467688
26/04/16 19:49:37 20506      testThinClientQuerymain@1510467688
26/04/16 19:49:32 15904      testThinClientIncrementalChangeFeedmain@1510467688
diff --git a/test-output/old/Command line suite/reporter-output.html b/test-output/old/Command line suite/reporter-output.html new file mode 100644 index 000000000000..063bc2e96fd0 --- /dev/null +++ b/test-output/old/Command line suite/reporter-output.html @@ -0,0 +1 @@ +

Reporter output

\ No newline at end of file diff --git a/test-output/old/Command line suite/testng.xml.html b/test-output/old/Command line suite/testng.xml.html new file mode 100644 index 000000000000..fce06257443b --- /dev/null +++ b/test-output/old/Command line suite/testng.xml.html @@ -0,0 +1 @@ +testng.xml for Command line suite<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite name="Command line suite" verbose="2">
  <groups>
    <run>
      <include name="thinclient"/>
    </run>
  </groups>
  <test thread-count="5" name="Command line test" verbose="2">
    <classes>
      <class name="com.azure.cosmos.implementation.ThinClientE2ETest"/>
    </classes>
  </test> <!-- Command line test -->
</suite> <!-- Command line suite -->
\ No newline at end of file diff --git a/test-output/old/Command line suite/toc.html b/test-output/old/Command line suite/toc.html new file mode 100644 index 000000000000..5306781cbc98 --- /dev/null +++ b/test-output/old/Command line suite/toc.html @@ -0,0 +1,30 @@ + + +Results for Command line suite + + + + +

Results for
Command line suite

+ + + + + + + + + + +
1 test1 class5 methods:
+  chronological
+  alphabetical
+  not run (0)
1 groupreporter outputtestng.xml
+ +

+

+
Command line test (0/5/10) + Results +
+
+ \ No newline at end of file diff --git a/test-output/old/index.html b/test-output/old/index.html new file mode 100644 index 000000000000..a5293a03e4ba --- /dev/null +++ b/test-output/old/index.html @@ -0,0 +1,9 @@ + + + + +

Test results

+ + + +
SuitePassedFailedSkippedtestng.xml
Total0510 
Command line suite0510Link
diff --git a/test-output/passed.png b/test-output/passed.png new file mode 100644 index 0000000000000000000000000000000000000000..45e85bbfd0f5e85def14b896cfd4331675be2759 GIT binary patch literal 1019 zcmV4Tx0C)j~RNrgUP!#^!Wu36$i#lf!2|j3%Ze&w*L!7p2SGvtw>Nd9_NSmf@ zT$;ut?S8Na*^6&F#dq-sKKTa>*@JI;k`2ZbVfd_wB24xov!0tYO(#d#()tZ$I5%3%!zLYh@BH>w}XODA7?mkV}ap}jU$$3 zG&Mk)3Bm`(LOM&hKscCb;PVaG&Vdx+MpZJHTQ(R_;DA31$+jOGBoLXk_De?ey1m!ik&_4G zH9n^))_*|$z4!HUisgBd@awc5jn(v9k~&t~+vLrrBg4dZQ9lDnLV}JQWGLW~LJVP= zW5lZXOcog;N~F?hbX0k=IMzETla}oqM|jC!4!B+x^;@#I_Tc-T-6hwKycLDTx1-om z?X`jFy0R0R8-I0SrK4`)H@W4T8*Qr#2vPou<*`U!Wy(*2QP*`g=8#jD{B;Y@GL-Hm zb`n?&x~%YC_$q7)PlXr4m%r4=&fcvN%Ybn#KC7Nn&Bp8{(oE9pWVpYI^+LuN`H(R~ zTAjWmO`M83^4d@fCkA(d>*nHIFV_d2yUbnT`nd?LE^;G|!WZ>Ld?E0@Grm4ww{M7H zr`x{MWb30bTI;*hk-DO>dX$gbC-yy#suLNqvA(f>RtPJ!qGM`Gvvf}Y10`)vm-7Xa z?-7Ixe2A_siI1ydSCCID3U8SVUY86>uSnT0use_K1GZDvUFKY)t}F* z)!pahe+zh{{06Bb3f97*Uorpy0GLTcK~yLeW0ahz`=5aXz(j&tuu_sWu%O#uE8~VD zl&lrR;HF{4AT>#kuni$fu3*LaYg^!kpg8GS-X(?~-@n6gsDV2}@4opAtDmldYd~=l z$fS+YQyErY*vatm`)9DCL(k8^6@wTk8o(y4Wnh>XTmx2AyLA%7m+#+DG@v*MBy;8c pT?UXs5IFYyJeWo%7zba(0RWt9G$oT4y{G^H002ovPDHLkV1nS74Tx0C)j~RNrgUP!#^!Wu36$i#lf!2|j3%Ze&w*L!7p2SGvtw>Nd9_NSmf@ zT$;ut?S8Na*^6&F#dq-sKKTa>*@JI;k`2ZbVfd_wB24xov!0tYO(#d#()tZ$I5%3%!zLYh@BH>w}XODA7?mkV}ap}jU$$3 zG&Mk)3Bm`(LOM&hKscCb;PVaG&Vdx+MpZJHTQ(R_;DA31$+jOGBoLXk_De?ey1m!ik&_4G zH9n^))_*|$z4!HUisgBd@awc5jn(v9k~&t~+vLrrBg4dZQ9lDnLV}JQWGLW~LJVP= zW5lZXOcog;N~F?hbX0k=IMzETla}oqM|jC!4!B+x^;@#I_Tc-T-6hwKycLDTx1-om z?X`jFy0R0R8-I0SrK4`)H@W4T8*Qr#2vPou<*`U!Wy(*2QP*`g=8#jD{B;Y@GL-Hm zb`n?&x~%YC_$q7)PlXr4m%r4=&fcvN%Ybn#KC7Nn&Bp8{(oE9pWVpYI^+LuN`H(R~ zTAjWmO`M83^4d@fCkA(d>*nHIFV_d2yUbnT`nd?LE^;G|!WZ>Ld?E0@Grm4ww{M7H zr`x{MWb30bTI;*hk-DO>dX$gbC-yy#suLNqvA(f>RtPJ!qGM`Gvvf}Y10`)vm-7Xa z?-7Ixe2A_siI1ydSCCID3U8SVUY86>uSnT0use_K1GZDvUFKY)t}F* z)!pahe+zh{{06Bb3f97*Uorpy0Axu-K~yLeV|;sz;XeZjfQbaPV5M*kLYBBKLY9MT zcz2wU0a*fOGe`_12Lo^oAOUnu=!!vVSU?0aK-Pq8GE5DM4KP7`G=>J4GmvdUHULEf pOfgIWHcfC1=!$V^Vx)OY0{~v*D#slo71{s*002ovPDHLkV1jLYy!8M8 literal 0 HcmV?d00001 diff --git a/test-output/testng-failed.xml b/test-output/testng-failed.xml new file mode 100644 index 000000000000..3737295542f1 --- /dev/null +++ b/test-output/testng-failed.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-output/testng-reports.css b/test-output/testng-reports.css new file mode 100644 index 000000000000..d7b75c404782 --- /dev/null +++ b/test-output/testng-reports.css @@ -0,0 +1,326 @@ +body { + margin: 0 0 5px 5px; +} + +ul { + margin: 0; +} + +li { + list-style-type: none; +} + +a { + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +.navigator-selected { + background: #ffa500; +} + +.wrapper { + position: absolute; + top: 60px; + bottom: 0; + left: 400px; + right: 0; + overflow: auto; +} + +.navigator-root { + position: absolute; + top: 60px; + bottom: 0; + left: 0; + width: 400px; + overflow-y: auto; +} + +.suite { + margin: 0 10px 10px 0; + background-color: #fff8dc; +} + +.suite-name { + padding-left: 10px; + font-size: 25px; + font-family: Times, sans-serif; +} + +.main-panel-header { + padding: 5px; + background-color: #9FB4D9; /*afeeee*/; + font-family: monospace; + font-size: 18px; +} + +.main-panel-content { + padding: 5px; + margin-bottom: 10px; + background-color: #DEE8FC; /*d0ffff*/; +} + +.rounded-window { + border-radius: 10px; + border-style: solid; + border-width: 1px; +} + +.rounded-window-top { + border-top-right-radius: 10px 10px; + border-top-left-radius: 10px 10px; + border-style: solid; + border-width: 1px; + overflow: auto; +} + +.light-rounded-window-top { + border-top-right-radius: 10px 10px; + border-top-left-radius: 10px 10px; +} + +.rounded-window-bottom { + border-style: solid; + border-width: 0 1px 1px 1px; + border-bottom-right-radius: 10px 10px; + border-bottom-left-radius: 10px 10px; + overflow: auto; +} + +.method-name { + font-size: 12px; + font-family: monospace; +} + +.method-content { + border-style: solid; + border-width: 0 0 1px 0; + margin-bottom: 10px; + padding-bottom: 5px; + width: 80%; +} + +.parameters { + font-size: 14px; + font-family: monospace; +} + +.stack-trace { + white-space: pre; + font-family: monospace; + font-size: 12px; + font-weight: bold; + margin-top: 0; + margin-left: 20px; +} + +.testng-xml { + font-family: monospace; +} + +.method-list-content { + margin-left: 10px; +} + +.navigator-suite-content { + margin-left: 10px; + font: 12px 'Lucida Grande'; +} + +.suite-section-title { + margin-top: 10px; + width: 80%; + border-style: solid; + border-width: 1px 0 0 0; + font-family: Times, sans-serif; + font-size: 18px; + font-weight: bold; +} + +.suite-section-content { + list-style-image: url(bullet_point.png); +} + +.top-banner-root { + position: absolute; + top: 0; + height: 45px; + left: 0; + right: 0; + padding: 5px; + margin: 0 0 5px 0; + background-color: #0066ff; + font-family: Times, sans-serif; + color: #fff; + text-align: center; +} +.button{ + position: absolute; + margin-left:500px; + margin-top:8px; + background-color: white; + color:#0066ff; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight:bold; + border-color:#0066ff ; + border-radius:25px; + cursor: pointer; + height:30px; + width:150px; + outline:none; + +} + +.top-banner-title-font { + font-size: 25px; +} + +.test-name { + font-family: 'Lucida Grande', sans-serif; + font-size: 16px; +} + +.suite-icon { + padding: 5px; + float: right; + height: 20px; +} + +.test-group { + font: 20px 'Lucida Grande'; + margin: 5px 5px 10px 5px; + border-width: 0 0 1px 0; + border-style: solid; + padding: 5px; +} + +.test-group-name { + font-weight: bold; +} + +.method-in-group { + font-size: 16px; + margin-left: 80px; +} + +table.google-visualization-table-table { + width: 100%; +} + +.reporter-method-name { + font-size: 14px; + font-family: monospace; +} + +.reporter-method-output-div { + padding: 5px; + margin: 0 0 5px 20px; + font-size: 12px; + font-family: monospace; + border-width: 0 0 0 1px; + border-style: solid; +} + +.ignored-class-div { + font-size: 14px; + font-family: monospace; +} + +.ignored-methods-div { + padding: 5px; + margin: 0 0 5px 20px; + font-size: 12px; + font-family: monospace; + border-width: 0 0 0 1px; + border-style: solid; +} + +.border-failed { + border-top-left-radius: 10px 10px; + border-bottom-left-radius: 10px 10px; + border-style: solid; + border-width: 0 0 0 10px; + border-color: #f00; +} + +.border-skipped { + border-top-left-radius: 10px 10px; + border-bottom-left-radius: 10px 10px; + border-style: solid; + border-width: 0 0 0 10px; + border-color: #edc600; +} + +.border-passed { + border-top-left-radius: 10px 10px; + border-bottom-left-radius: 10px 10px; + border-style: solid; + border-width: 0 0 0 10px; + border-color: #19f52d; +} + +.times-div { + text-align: center; + padding: 5px; +} + +.suite-total-time { + font: 16px 'Lucida Grande'; +} + +.configuration-suite { + margin-left: 20px; +} + +.configuration-test { + margin-left: 40px; +} + +.configuration-class { + margin-left: 60px; +} + +.configuration-method { + margin-left: 80px; +} + +.test-method { + margin-left: 100px; +} + +.chronological-class { + background-color: skyblue; + border-style: solid; + border-width: 0 0 1px 1px; +} + +.method-start { + float: right; +} + +.chronological-class-name { + padding: 0 0 0 5px; + color: #008; +} + +.after, .before, .test-method { + font-family: monospace; + font-size: 14px; +} + +.navigator-suite-header { + font-size: 22px; + margin: 0 10px 5px 0; + background-color: #deb887; + text-align: center; +} + +.collapse-all-icon { + padding: 5px; + float: right; +} +/*retro Theme*/ diff --git a/test-output/testng-reports.js b/test-output/testng-reports.js new file mode 100644 index 000000000000..c1a84a35d453 --- /dev/null +++ b/test-output/testng-reports.js @@ -0,0 +1,122 @@ +$(document).ready(function() { + $('a.navigator-link').on("click", function() { + // Extract the panel for this link + var panel = getPanelName($(this)); + + // Mark this link as currently selected + $('.navigator-link').parent().removeClass('navigator-selected'); + $(this).parent().addClass('navigator-selected'); + + showPanel(panel); + }); + + installMethodHandlers('failed'); + installMethodHandlers('skipped'); + installMethodHandlers('passed', true); // hide passed methods by default + + $('a.method').on("click", function() { + showMethod($(this)); + return false; + }); + + // Hide all the panels and display the first one (do this last + // to make sure the click() will invoke the listeners) + $('.panel').hide(); + $('.navigator-link').first().trigger("click"); + + // Collapse/expand the suites + $('a.collapse-all-link').on("click", function() { + var contents = $('.navigator-suite-content'); + if (contents.css('display') == 'none') { + contents.show(); + } else { + contents.hide(); + } + }); +}); + +// The handlers that take care of showing/hiding the methods +function installMethodHandlers(name, hide) { + function getContent(t) { + return $('.method-list-content.' + name + "." + t.attr('panel-name')); + } + + function getHideLink(t, name) { + var s = 'a.hide-methods.' + name + "." + t.attr('panel-name'); + return $(s); + } + + function getShowLink(t, name) { + return $('a.show-methods.' + name + "." + t.attr('panel-name')); + } + + function getMethodPanelClassSel(element, name) { + var panelName = getPanelName(element); + var sel = '.' + panelName + "-class-" + name; + return $(sel); + } + + $('a.hide-methods.' + name).on("click", function() { + var w = getContent($(this)); + w.hide(); + getHideLink($(this), name).hide(); + getShowLink($(this), name).show(); + getMethodPanelClassSel($(this), name).hide(); + }); + + $('a.show-methods.' + name).on("click", function() { + var w = getContent($(this)); + w.show(); + getHideLink($(this), name).show(); + getShowLink($(this), name).hide(); + showPanel(getPanelName($(this))); + getMethodPanelClassSel($(this), name).show(); + }); + + if (hide) { + $('a.hide-methods.' + name).trigger("click"); + } else { + $('a.show-methods.' + name).trigger("click"); + } +} + +function getHashForMethod(element) { + return element.attr('hash-for-method'); +} + +function getPanelName(element) { + return element.attr('panel-name'); +} + +function showPanel(panelName) { + $('.panel').hide(); + var panel = $('.panel[panel-name="' + panelName + '"]'); + panel.show(); +} + +function showMethod(element) { + var hashTag = getHashForMethod(element); + var panelName = getPanelName(element); + showPanel(panelName); + var current = document.location.href; + var base = current.substring(0, current.indexOf('#')) + document.location.href = base + '#' + hashTag; + var newPosition = $(document).scrollTop() - 65; + $(document).scrollTop(newPosition); +} + +function drawTable() { + for (var i = 0; i < suiteTableInitFunctions.length; i++) { + window[suiteTableInitFunctions[i]](); + } + + for (var k in window.suiteTableData) { + var v = window.suiteTableData[k]; + var div = v.tableDiv; + var data = v.tableData + var table = new google.visualization.Table(document.getElementById(div)); + table.draw(data, { + showRowNumber : false + }); + } +} diff --git a/test-output/testng-reports1.css b/test-output/testng-reports1.css new file mode 100644 index 000000000000..570323ffb8fe --- /dev/null +++ b/test-output/testng-reports1.css @@ -0,0 +1,344 @@ +body { + background-color: whitesmoke; + margin: 0 0 5px 5px; +} +ul { + margin-top: 10px; + margin-left:-10px; +} + li { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + padding:5px 5px; + } + a { + text-decoration: none; + color: black; + font-size: 14px; + } + + a:hover { + color:black ; + text-decoration: underline; + } + + .navigator-selected { + /* #ffa500; Mouse hover color after click Orange.*/ + background:#027368 + } + + .wrapper { + position: absolute; + top: 60px; + bottom: 0; + left: 400px; + right: 0; + margin-right:9px; + overflow: auto;/*imortant*/ + } + + .navigator-root { + position: absolute; + top: 60px; + bottom: 0; + left: 0; + width: 400px; + overflow-y: auto;/*important*/ + } + + .suite { + margin: -5px 10px 10px 5px; + background-color: whitesmoke ;/*Colour of the left bside box*/ + } + + .suite-name { + font-size: 24px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;/*All TEST SUITE*/ + color: white; + } + + .main-panel-header { + padding: 5px; + background-color: #027368; /*afeeee*/; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + color:white; + font-size: 18px; + } + + .main-panel-content { + padding: 5px; + margin-bottom: 10px; + background-color: #CCD0D1; /*d0ffff*/; /*Belongs to backGround of rightSide boxes*/ + } + + .rounded-window { + border-style: dotted; + border-width: 1px;/*Border of left Side box*/ + background-color: whitesmoke; + border-radius: 10px; + } + + .rounded-window-top { + border-top-right-radius: 10px 10px; + border-top-left-radius: 10px 10px; + border-style: solid; + border-width: 1px; + overflow: auto;/*Top of RightSide box*/ + } + + .light-rounded-window-top { + background-color: #027368; + padding-left:120px; + border-radius: 10px; + + } + + .rounded-window-bottom { + border-bottom-right-radius: 10px 10px; + border-bottom-left-radius: 10px 10px; + overflow: auto;/*Bottom of rightSide box*/ + } + + .method-name { + font-size: 14px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight: bold; + } + + .method-content { + border-style: solid; + border-width: 0 0 1px 0; + margin-bottom: 10px; + padding-bottom: 5px; + width: 100%; + } + + .parameters { + font-size: 14px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + } + + .stack-trace { + white-space: pre; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; + font-weight: bold; + margin-top: 0; + margin-left: 20px; /*Error Stack Trace Message*/ + } + + .testng-xml { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + } + + .method-list-content { + margin-left: 10px; + } + + .navigator-suite-content { + margin-left: 10px; + font: 12px 'Lucida Grande'; + } + + .suite-section-title { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + font-weight:bold; + background-color: #8C8887; + margin-left: -10px; + margin-top:10px; + padding:6px; + } + + .suite-section-content { + list-style-image: url(bullet_point.png); + background-color: whitesmoke; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + overflow: hidden; + } + + .top-banner-root { + position: absolute; + top: 0; + height: 45px; + left: 0; + right: 0; + padding: 5px; + margin: 0 0 5px 0; + background-color: #027368; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 18px; + color: #fff; + text-align: center;/*Belongs to the Top of Report*//*Status: - Completed*/ + } + + .top-banner-title-font { + font-size: 25px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + padding: 3px; + float: right; + } + + .test-name { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 16px; + } + + .suite-icon { + padding: 5px; + float: right; + height: 20px; + } + + .test-group { + font: 20px 'Lucida Grande'; + margin: 5px 5px 10px 5px; + border-width: 0 0 1px 0; + border-style: solid; + padding: 5px; + } + + .test-group-name { + font-weight: bold; + } + + .method-in-group { + font-size: 16px; + margin-left: 80px; + } + + table.google-visualization-table-table { + width: 100%; + } + + .reporter-method-name { + font-size: 14px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + } + + .reporter-method-output-div { + padding: 5px; + margin: 0 0 5px 20px; + font-size: 12px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + border-width: 0 0 0 1px; + border-style: solid; + } + + .ignored-class-div { + font-size: 14px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + } + + .ignored-methods-div { + padding: 5px; + margin: 0 0 5px 20px; + font-size: 12px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + border-width: 0 0 0 1px; + border-style: solid; + } + + .border-failed { + border-radius:2px; + border-style: solid; + border-width: 0 0 0 10px; + border-color: #F20505; + } + + .border-skipped { + border-radius:2px; + border-style: solid; + border-width: 0 0 0 10px; + border-color: #F2BE22; + } + + .border-passed { + border-radius:2px; + border-style: solid; + border-width: 0 0 0 10px; + border-color: #038C73; + } + + .times-div { + text-align: center; + padding: 5px; + } + + .suite-total-time { + font: 16px 'Lucida Grande'; + } + + .configuration-suite { + margin-left: 20px; + } + + .configuration-test { + margin-left: 40px; + } + + .configuration-class { + margin-left: 60px; + } + + .configuration-method { + margin-left: 80px; + } + + .test-method { + margin-left: 100px; + } + + .chronological-class { + background-color: #CCD0D1; + border-width: 0 0 1px 1px;/*Chronological*/ + } + + .method-start { + float: right; + } + + .chronological-class-name { + padding: 0 0 0 5px; + margin-top:5px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + color: #008; + } + + .after, .before, .test-method { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + margin-top:5px; + } + + .navigator-suite-header { + font-size: 18px; + margin: 0px 10px 10px 5px; + padding: 5px; + border-radius: 10px; + background-color: #027368; + color: white; + font-weight:bold; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + text-align: center; /*All Suites on top of left box*//*Status: -Completed*/ + } + + .collapse-all-icon { + padding: 3px; + float: right; + } + .button{ + position: absolute; + margin-left:500px; + margin-top:8px; + background-color: white; + color:#027368; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight:bold; + border-color:#027368; + border-radius:25px; + cursor: pointer; + height:30px; + width:150px; + outline: none; +} +/*Author: - Akhil Gullapalli*/ \ No newline at end of file diff --git a/test-output/testng-reports2.js b/test-output/testng-reports2.js new file mode 100644 index 000000000000..5342859fa4df --- /dev/null +++ b/test-output/testng-reports2.js @@ -0,0 +1,76 @@ +window.onload = function () { + let cookies = document.cookie; + let cookieValue = cookies.split('='); + if (cookieValue[1] === 'null' || localStorage.getItem('Theme') === 'null') { + document.getElementById('retro').setAttribute('disabled', 'false'); + } else if (cookieValue[1] === 'Switch Ultra Theme' || + localStorage.getItem('Theme') === 'Switch Ultra Theme') { + document.getElementById('button').innerText = "Switch Retro Theme"; + document.getElementById('retro').setAttribute('disabled', 'false'); + + } else if (cookieValue[1] === 'Switch Retro Theme' || + localStorage.getItem('Theme') === 'Switch Retro Theme') { + if (cookieValue[1] === 'Switch Ultra Theme' || + localStorage.getItem('Theme') === 'Switch Ultra Theme') { + document.getElementById('button').innerText = "Switch Retro Theme"; + document.getElementById('retro').setAttribute('disabled', 'false'); + + document.getElementById('button').innerText = "Switch Ultra Theme"; + document.getElementById('retro').removeAttribute('disabled'); + document.getElementById('ultra').setAttribute('disabled', 'false'); + localStorage.setItem('Theme', select); + + } else if (select === 'Switch Ultra Theme') { + document.getElementById('button').innerText = "Switch Retro Theme"; + document.getElementById('ultra').removeAttribute('disabled'); + document.getElementById('retro').setAttribute('disabled', 'false'); + localStorage.setItem('Theme', select); + } + } else if (cookieValue[1] === 'Switch Retro Theme' || + localStorage.getItem('Theme') === 'Switch Retro Theme') { + document.getElementById('button').innerText = "Switch Ultra Theme"; + document.getElementById('ultra').setAttribute('disabled', 'false'); + } +} +document.getElementById('button').onclick = function () { + let select = document.getElementById('button').innerText; + if (select === 'Switch Retro Theme') { + let d = new Date(); + days = 365; + d.setTime(+d + (days * 86400000)); //24 * 60 * 60 * 1000 + document.cookie = "Theme =" + select + "; expires=" + d.toGMTString() + ";"; + document.getElementById('button').innerText = "Switch Ultra Theme"; + document.getElementById('retro').removeAttribute('disabled'); + document.getElementById('ultra').setAttribute('disabled', 'false'); + localStorage.setItem('Theme', select); + + } else if (select === 'Switch Ultra Theme') { + let d = new Date(); + days = 365; + d.setTime(+d + (days * 86400000)); //24 * 60 * 60 * 1000 + document.cookie = "Theme =" + select + "; expires=" + d.toGMTString() + ";"; + document.getElementById('button').innerText = "Switch Retro Theme"; + document.getElementById('ultra').removeAttribute('disabled'); + document.getElementById('retro').setAttribute('disabled', 'false'); + localStorage.setItem('Theme', select); + } +} +//Function to mouse hovering affect. +document.getElementById('button').onmouseover = function () { + document.getElementById('button').style.borderRadius = "25px"; + document.getElementById('button').style.width = "180px"; + document.getElementById('button').style.height = "45px"; + document.getElementById('button').style.marginTop = "1px"; + +} +//Function to mouse out affect +document.getElementById('button').onmouseout = function () { + document.getElementById('button').style.borderRadius = "25px"; + document.getElementById('button').style.width = "150px"; + document.getElementById('button').style.height = "30px"; + document.getElementById('button').style.marginTop = "8px"; + +} + +//This is the file where we handle the switching of the Themes. +/*Author:- Akhil Gullapalli*/ diff --git a/test-output/testng-results.xml b/test-output/testng-results.xml new file mode 100644 index 000000000000..3cb120d3055e --- /dev/null +++ b/test-output/testng-results.xml @@ -0,0 +1,845 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-output/testng.css b/test-output/testng.css new file mode 100644 index 000000000000..5124ba863b37 --- /dev/null +++ b/test-output/testng.css @@ -0,0 +1,9 @@ +.invocation-failed, .test-failed { background-color: #DD0000; } +.invocation-percent, .test-percent { background-color: #006600; } +.invocation-passed, .test-passed { background-color: #00AA00; } +.invocation-skipped, .test-skipped { background-color: #CCCC00; } + +.main-page { + font-size: x-large; +} + From e3f4a84062cd5992f2d59b65c3328691c8875fc7 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 23 Apr 2026 17:06:29 -0400 Subject: [PATCH 19/46] Remove test-output build artifacts from tracking (#48094) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Command line suite/Command line test.html | 1467 ----------------- .../Command line suite/Command line test.xml | 274 --- .../Command line suite/testng-failed.xml | 22 - test-output/bullet_point.png | Bin 356 -> 0 bytes test-output/collapseall.gif | Bin 157 -> 0 bytes test-output/emailable-report.html | 317 ---- test-output/failed.png | Bin 977 -> 0 bytes test-output/index.html | 0 test-output/jquery.min.js | 2 - ....GatewayReadConsistencyStrategyE2ETest.xml | 52 - ...entation.ConsistencyFlagContentionTest.xml | 24 - ...osmos.implementation.ThinClientE2ETest.xml | 289 ---- ...inClientReadConsistencyStrategyE2ETest.xml | 28 - test-output/navigator-bullet.png | Bin 352 -> 0 bytes .../Command line test.properties | 1 - .../old/Command line suite/classes.html | 49 - .../old/Command line suite/groups.html | 3 - test-output/old/Command line suite/index.html | 6 - test-output/old/Command line suite/main.html | 2 - .../methods-alphabetical.html | 34 - .../Command line suite/methods-not-run.html | 2 - .../old/Command line suite/methods.html | 34 - .../Command line suite/reporter-output.html | 1 - .../old/Command line suite/testng.xml.html | 1 - test-output/old/Command line suite/toc.html | 30 - test-output/old/index.html | 9 - test-output/passed.png | Bin 1019 -> 0 bytes test-output/skipped.png | Bin 967 -> 0 bytes test-output/testng-failed.xml | 22 - test-output/testng-reports.css | 326 ---- test-output/testng-reports.js | 122 -- test-output/testng-reports1.css | 344 ---- test-output/testng-reports2.js | 76 - test-output/testng-results.xml | 845 ---------- test-output/testng.css | 9 - 35 files changed, 4391 deletions(-) delete mode 100644 test-output/Command line suite/Command line test.html delete mode 100644 test-output/Command line suite/Command line test.xml delete mode 100644 test-output/Command line suite/testng-failed.xml delete mode 100644 test-output/bullet_point.png delete mode 100644 test-output/collapseall.gif delete mode 100644 test-output/emailable-report.html delete mode 100644 test-output/failed.png delete mode 100644 test-output/index.html delete mode 100644 test-output/jquery.min.js delete mode 100644 test-output/junitreports/TEST-com.azure.cosmos.GatewayReadConsistencyStrategyE2ETest.xml delete mode 100644 test-output/junitreports/TEST-com.azure.cosmos.implementation.ConsistencyFlagContentionTest.xml delete mode 100644 test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientE2ETest.xml delete mode 100644 test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientReadConsistencyStrategyE2ETest.xml delete mode 100644 test-output/navigator-bullet.png delete mode 100644 test-output/old/Command line suite/Command line test.properties delete mode 100644 test-output/old/Command line suite/classes.html delete mode 100644 test-output/old/Command line suite/groups.html delete mode 100644 test-output/old/Command line suite/index.html delete mode 100644 test-output/old/Command line suite/main.html delete mode 100644 test-output/old/Command line suite/methods-alphabetical.html delete mode 100644 test-output/old/Command line suite/methods-not-run.html delete mode 100644 test-output/old/Command line suite/methods.html delete mode 100644 test-output/old/Command line suite/reporter-output.html delete mode 100644 test-output/old/Command line suite/testng.xml.html delete mode 100644 test-output/old/Command line suite/toc.html delete mode 100644 test-output/old/index.html delete mode 100644 test-output/passed.png delete mode 100644 test-output/skipped.png delete mode 100644 test-output/testng-failed.xml delete mode 100644 test-output/testng-reports.css delete mode 100644 test-output/testng-reports.js delete mode 100644 test-output/testng-reports1.css delete mode 100644 test-output/testng-reports2.js delete mode 100644 test-output/testng-results.xml delete mode 100644 test-output/testng.css diff --git a/test-output/Command line suite/Command line test.html b/test-output/Command line suite/Command line test.html deleted file mode 100644 index dea6d28734e7..000000000000 --- a/test-output/Command line suite/Command line test.html +++ /dev/null @@ -1,1467 +0,0 @@ - - -TestNG: Command line test - - - - - - - - -

Command line test

- - - - - - - - - - - -
Tests passed/Failed/Skipped:0/5/10
Started on:Thu Apr 16 19:49:10 EDT 2026
Total time:27 seconds (27916 ms)
Included groups:thinclient
Excluded groups:

-(Hover the method name to see the test class name)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FAILED TESTS
Test methodExceptionTime (seconds)Instance
testThinClientDocumentPointOperations
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: 274de798-8a4f-4e3a-92bf-3f67f87435c9, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 274de798-8a4f-4e3a-92bf-3f67f87435c9, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:30 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=274de798-8a4f-4e3a-92bf-3f67f87435c9, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:49:29 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"274de798-8a4f-4e3a-92bf-3f67f87435c9","requestLatencyInMs":737,"requestStartTimeUTC":"2026-04-16T23:49:29.264265200Z","requestEndTimeUTC":"2026-04-16T23:49:30.001936400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:49:29.264265200Z","endTimeUTC":"2026-04-16T23:49:29.264265200Z","durationInMilliSecs":0.0}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:29.264265200Z","durationInMilliSecs":527.3282},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:29.791593400Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:29.791593400Z","durationInMilliSecs":2.0096},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:29.793603Z","durationInMilliSecs":205.2918},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:29.998894800Z","durationInMilliSecs":1.0395}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 274de798-8a4f-4e3a-92bf-3f67f87435c9, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:30 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=274de798-8a4f-4e3a-92bf-3f67f87435c9, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"100a0782/1","parentChannelId":"100a0782","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"18662 KB","availableMemory":"12490522 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":9,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
Click to show all stack frames -
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: 274de798-8a4f-4e3a-92bf-3f67f87435c9, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 274de798-8a4f-4e3a-92bf-3f67f87435c9, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:30 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=274de798-8a4f-4e3a-92bf-3f67f87435c9, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:49:29 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"274de798-8a4f-4e3a-92bf-3f67f87435c9","requestLatencyInMs":737,"requestStartTimeUTC":"2026-04-16T23:49:29.264265200Z","requestEndTimeUTC":"2026-04-16T23:49:30.001936400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:49:29.264265200Z","endTimeUTC":"2026-04-16T23:49:29.264265200Z","durationInMilliSecs":0.0}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:29.264265200Z","durationInMilliSecs":527.3282},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:29.791593400Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:29.791593400Z","durationInMilliSecs":2.0096},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:29.793603Z","durationInMilliSecs":205.2918},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:29.998894800Z","durationInMilliSecs":1.0395}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 274de798-8a4f-4e3a-92bf-3f67f87435c9, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:30 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=274de798-8a4f-4e3a-92bf-3f67f87435c9, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"100a0782/1","parentChannelId":"100a0782","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"18662 KB","availableMemory":"12490522 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":9,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
2com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientBulk
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 51d4652f-ed2f-434e-8398-9e139ac71c0e, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 51d4652f-ed2f-434e-8398-9e139ac71c0e, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:22 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=30.137, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=240537, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=51d4652f-ed2f-434e-8398-9e139ac71c0e, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:21 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"51d4652f-ed2f-434e-8398-9e139ac71c0e","requestLatencyInMs":624,"requestStartTimeUTC":"2026-04-16T23:49:21.237582200Z","requestEndTimeUTC":"2026-04-16T23:49:21.861678400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:21.237582200Z","durationInMilliSecs":491.3054},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:21.728887600Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:21.728887600Z","durationInMilliSecs":1.0075},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:21.729895100Z","durationInMilliSecs":128.7777},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:21.858672800Z","durationInMilliSecs":2.0056}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 51d4652f-ed2f-434e-8398-9e139ac71c0e, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:22 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=30.137, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=240537, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=51d4652f-ed2f-434e-8398-9e139ac71c0e, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"6090a233/1","parentChannelId":"6090a233","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"19111 KB","availableMemory":"12490073 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":6,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
Click to show all stack frames -
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 51d4652f-ed2f-434e-8398-9e139ac71c0e, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 51d4652f-ed2f-434e-8398-9e139ac71c0e, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:22 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=30.137, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=240537, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=51d4652f-ed2f-434e-8398-9e139ac71c0e, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:21 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"51d4652f-ed2f-434e-8398-9e139ac71c0e","requestLatencyInMs":624,"requestStartTimeUTC":"2026-04-16T23:49:21.237582200Z","requestEndTimeUTC":"2026-04-16T23:49:21.861678400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:21.237582200Z","durationInMilliSecs":491.3054},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:21.728887600Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:21.728887600Z","durationInMilliSecs":1.0075},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:21.729895100Z","durationInMilliSecs":128.7777},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:21.858672800Z","durationInMilliSecs":2.0056}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 51d4652f-ed2f-434e-8398-9e139ac71c0e, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:22 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=30.137, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=240537, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=51d4652f-ed2f-434e-8398-9e139ac71c0e, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"6090a233/1","parentChannelId":"6090a233","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"18662 KB","availableMemory":"12490522 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":6,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientBatch
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 829980cc-ad2a-48ea-bae7-3d58a3851643, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 829980cc-ad2a-48ea-bae7-3d58a3851643, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:18 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=22.679, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=280858, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=829980cc-ad2a-48ea-bae7-3d58a3851643, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:17 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"829980cc-ad2a-48ea-bae7-3d58a3851643","requestLatencyInMs":654,"requestStartTimeUTC":"2026-04-16T23:49:17.401352Z","requestEndTimeUTC":"2026-04-16T23:49:18.055532700Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:17.402352600Z","durationInMilliSecs":503.8345},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:17.906187100Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:17.906187100Z","durationInMilliSecs":2.0078},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:17.908194900Z","durationInMilliSecs":145.2276},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:18.053422500Z","durationInMilliSecs":1.0575}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 829980cc-ad2a-48ea-bae7-3d58a3851643, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:18 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=22.679, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=280858, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=829980cc-ad2a-48ea-bae7-3d58a3851643, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"6ea9093d/1","parentChannelId":"6ea9093d","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"19111 KB","availableMemory":"12490073 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":3,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
Click to show all stack frames -
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 829980cc-ad2a-48ea-bae7-3d58a3851643, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 829980cc-ad2a-48ea-bae7-3d58a3851643, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:18 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=22.679, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=280858, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=829980cc-ad2a-48ea-bae7-3d58a3851643, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:17 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"829980cc-ad2a-48ea-bae7-3d58a3851643","requestLatencyInMs":654,"requestStartTimeUTC":"2026-04-16T23:49:17.401352Z","requestEndTimeUTC":"2026-04-16T23:49:18.055532700Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:17.402352600Z","durationInMilliSecs":503.8345},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:17.906187100Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:17.906187100Z","durationInMilliSecs":2.0078},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:17.908194900Z","durationInMilliSecs":145.2276},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:18.053422500Z","durationInMilliSecs":1.0575}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 829980cc-ad2a-48ea-bae7-3d58a3851643, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:18 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=22.679, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=280858, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=829980cc-ad2a-48ea-bae7-3d58a3851643, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"6ea9093d/1","parentChannelId":"6ea9093d","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"19111 KB","availableMemory":"12490073 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":3,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientIncrementalChangeFeed
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: a9233c53-d4d3-4774-8147-87104188bdce, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a9233c53-d4d3-4774-8147-87104188bdce, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:34 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=26.702, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124702, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a9233c53-d4d3-4774-8147-87104188bdce, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:33 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"a9233c53-d4d3-4774-8147-87104188bdce","requestLatencyInMs":567,"requestStartTimeUTC":"2026-04-16T23:49:33.328114400Z","requestEndTimeUTC":"2026-04-16T23:49:33.895645100Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:33.328636800Z","durationInMilliSecs":436.3742},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:33.765011Z","durationInMilliSecs":1.0561},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:33.766067100Z","durationInMilliSecs":0.0},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:33.766067100Z","durationInMilliSecs":127.5662},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:33.893633300Z","durationInMilliSecs":1.0114}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a9233c53-d4d3-4774-8147-87104188bdce, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:34 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=26.702, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124702, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a9233c53-d4d3-4774-8147-87104188bdce, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"268816e0/1","parentChannelId":"268816e0","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"19571 KB","availableMemory":"12489613 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":12,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
Click to show all stack frames -
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: a9233c53-d4d3-4774-8147-87104188bdce, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a9233c53-d4d3-4774-8147-87104188bdce, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:34 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=26.702, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124702, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a9233c53-d4d3-4774-8147-87104188bdce, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:33 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"a9233c53-d4d3-4774-8147-87104188bdce","requestLatencyInMs":567,"requestStartTimeUTC":"2026-04-16T23:49:33.328114400Z","requestEndTimeUTC":"2026-04-16T23:49:33.895645100Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:33.328636800Z","durationInMilliSecs":436.3742},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:33.765011Z","durationInMilliSecs":1.0561},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:33.766067100Z","durationInMilliSecs":0.0},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:33.766067100Z","durationInMilliSecs":127.5662},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:33.893633300Z","durationInMilliSecs":1.0114}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a9233c53-d4d3-4774-8147-87104188bdce, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:34 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=26.702, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124702, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a9233c53-d4d3-4774-8147-87104188bdce, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"268816e0/1","parentChannelId":"268816e0","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"19571 KB","availableMemory":"12489613 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":12,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientQuery
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 7c0e663e-5d2b-42cc-8eec-92015003c6e3, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7c0e663e-5d2b-42cc-8eec-92015003c6e3, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:39 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=11.565, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234440, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7c0e663e-5d2b-42cc-8eec-92015003c6e3, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:37 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"7c0e663e-5d2b-42cc-8eec-92015003c6e3","requestLatencyInMs":660,"requestStartTimeUTC":"2026-04-16T23:49:37.966326100Z","requestEndTimeUTC":"2026-04-16T23:49:38.627305700Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:37.967388400Z","durationInMilliSecs":527.5339},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:38.494922300Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:38.494922300Z","durationInMilliSecs":3.0658},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:38.497988100Z","durationInMilliSecs":126.7908},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:38.624778900Z","durationInMilliSecs":1.0035}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7c0e663e-5d2b-42cc-8eec-92015003c6e3, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:39 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=11.565, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234440, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7c0e663e-5d2b-42cc-8eec-92015003c6e3, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"aa19cff2/1","parentChannelId":"aa19cff2","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20020 KB","availableMemory":"12489164 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":15,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
Click to show all stack frames -
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 7c0e663e-5d2b-42cc-8eec-92015003c6e3, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7c0e663e-5d2b-42cc-8eec-92015003c6e3, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:39 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=11.565, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234440, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7c0e663e-5d2b-42cc-8eec-92015003c6e3, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:37 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"7c0e663e-5d2b-42cc-8eec-92015003c6e3","requestLatencyInMs":660,"requestStartTimeUTC":"2026-04-16T23:49:37.966326100Z","requestEndTimeUTC":"2026-04-16T23:49:38.627305700Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:37.967388400Z","durationInMilliSecs":527.5339},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:38.494922300Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:38.494922300Z","durationInMilliSecs":3.0658},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:38.497988100Z","durationInMilliSecs":126.7908},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:38.624778900Z","durationInMilliSecs":1.0035}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7c0e663e-5d2b-42cc-8eec-92015003c6e3, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:39 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=11.565, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234440, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7c0e663e-5d2b-42cc-8eec-92015003c6e3, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"aa19cff2/1","parentChannelId":"aa19cff2","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"19571 KB","availableMemory":"12489613 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":15,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SKIPPED TESTS
Test methodExceptionTime (seconds)Instance
testThinClientBatch
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: a773f56d-a98f-4254-9d16-9eda5bc3a31d, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a773f56d-a98f-4254-9d16-9eda5bc3a31d, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:16 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=14.562, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234428, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a773f56d-a98f-4254-9d16-9eda5bc3a31d, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:14 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"a773f56d-a98f-4254-9d16-9eda5bc3a31d","requestLatencyInMs":663,"requestStartTimeUTC":"2026-04-16T23:49:14.800098Z","requestEndTimeUTC":"2026-04-16T23:49:15.463976400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:14.802156300Z","durationInMilliSecs":527.5531},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:15.329709400Z","durationInMilliSecs":0.9979},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:15.330707300Z","durationInMilliSecs":0.0},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:15.330707300Z","durationInMilliSecs":123.2438},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:15.453951100Z","durationInMilliSecs":0.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a773f56d-a98f-4254-9d16-9eda5bc3a31d, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:16 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=14.562, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234428, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a773f56d-a98f-4254-9d16-9eda5bc3a31d, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"1d51bd13/1","parentChannelId":"1d51bd13","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20020 KB","availableMemory":"12489164 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":1,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
Click to show all stack frames -
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: a773f56d-a98f-4254-9d16-9eda5bc3a31d, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a773f56d-a98f-4254-9d16-9eda5bc3a31d, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:16 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=14.562, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234428, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a773f56d-a98f-4254-9d16-9eda5bc3a31d, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:14 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"a773f56d-a98f-4254-9d16-9eda5bc3a31d","requestLatencyInMs":663,"requestStartTimeUTC":"2026-04-16T23:49:14.800098Z","requestEndTimeUTC":"2026-04-16T23:49:15.463976400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:14.802156300Z","durationInMilliSecs":527.5531},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:15.329709400Z","durationInMilliSecs":0.9979},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:15.330707300Z","durationInMilliSecs":0.0},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:15.330707300Z","durationInMilliSecs":123.2438},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:15.453951100Z","durationInMilliSecs":0.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a773f56d-a98f-4254-9d16-9eda5bc3a31d, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:16 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=14.562, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234428, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a773f56d-a98f-4254-9d16-9eda5bc3a31d, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"1d51bd13/1","parentChannelId":"1d51bd13","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20020 KB","availableMemory":"12489164 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":1,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
4com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientQuery
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: e4d2f9b7-ee38-4683-982f-84bf8bab9000, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: e4d2f9b7-ee38-4683-982f-84bf8bab9000, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:35 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=18.508, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134345, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=e4d2f9b7-ee38-4683-982f-84bf8bab9000, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:34 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"e4d2f9b7-ee38-4683-982f-84bf8bab9000","requestLatencyInMs":820,"requestStartTimeUTC":"2026-04-16T23:49:34.541306Z","requestEndTimeUTC":"2026-04-16T23:49:35.362235900Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:34.542303200Z","durationInMilliSecs":543.6669},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:35.085970100Z","durationInMilliSecs":1.0023},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:35.086972400Z","durationInMilliSecs":0.8079},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:35.087780300Z","durationInMilliSecs":270.4312},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:35.358211500Z","durationInMilliSecs":3.0238}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: e4d2f9b7-ee38-4683-982f-84bf8bab9000, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:35 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=18.508, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134345, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=e4d2f9b7-ee38-4683-982f-84bf8bab9000, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"9b00ed89/1","parentChannelId":"9b00ed89","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20469 KB","availableMemory":"12488715 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":13,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
Click to show all stack frames -
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: e4d2f9b7-ee38-4683-982f-84bf8bab9000, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: e4d2f9b7-ee38-4683-982f-84bf8bab9000, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:35 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=18.508, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134345, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=e4d2f9b7-ee38-4683-982f-84bf8bab9000, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:34 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"e4d2f9b7-ee38-4683-982f-84bf8bab9000","requestLatencyInMs":820,"requestStartTimeUTC":"2026-04-16T23:49:34.541306Z","requestEndTimeUTC":"2026-04-16T23:49:35.362235900Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:34.542303200Z","durationInMilliSecs":543.6669},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:35.085970100Z","durationInMilliSecs":1.0023},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:35.086972400Z","durationInMilliSecs":0.8079},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:35.087780300Z","durationInMilliSecs":270.4312},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:35.358211500Z","durationInMilliSecs":3.0238}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: e4d2f9b7-ee38-4683-982f-84bf8bab9000, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:35 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=18.508, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134345, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=e4d2f9b7-ee38-4683-982f-84bf8bab9000, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"9b00ed89/1","parentChannelId":"9b00ed89","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20469 KB","availableMemory":"12488715 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":13,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientDocumentPointOperations
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: 0016f4b7-df0e-4547-9cfa-429b57013084, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 0016f4b7-df0e-4547-9cfa-429b57013084, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:25 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=0016f4b7-df0e-4547-9cfa-429b57013084, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:49:23 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"0016f4b7-df0e-4547-9cfa-429b57013084","requestLatencyInMs":790,"requestStartTimeUTC":"2026-04-16T23:49:23.962794700Z","requestEndTimeUTC":"2026-04-16T23:49:24.752987Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:49:23.967398900Z","endTimeUTC":"2026-04-16T23:49:23.968889600Z","durationInMilliSecs":1.4907}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:23.970901500Z","durationInMilliSecs":550.1582},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:24.521059700Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:24.521059700Z","durationInMilliSecs":9.4527},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:24.530512400Z","durationInMilliSecs":206.9269},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:24.737439300Z","durationInMilliSecs":0.998}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 0016f4b7-df0e-4547-9cfa-429b57013084, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:25 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=0016f4b7-df0e-4547-9cfa-429b57013084, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"6eb526d1/1","parentChannelId":"6eb526d1","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20935 KB","availableMemory":"12488249 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":7,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
Click to show all stack frames -
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: 0016f4b7-df0e-4547-9cfa-429b57013084, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 0016f4b7-df0e-4547-9cfa-429b57013084, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:25 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=0016f4b7-df0e-4547-9cfa-429b57013084, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:49:23 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"0016f4b7-df0e-4547-9cfa-429b57013084","requestLatencyInMs":790,"requestStartTimeUTC":"2026-04-16T23:49:23.962794700Z","requestEndTimeUTC":"2026-04-16T23:49:24.752987Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:49:23.967398900Z","endTimeUTC":"2026-04-16T23:49:23.968889600Z","durationInMilliSecs":1.4907}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:23.970901500Z","durationInMilliSecs":550.1582},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:24.521059700Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:24.521059700Z","durationInMilliSecs":9.4527},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:24.530512400Z","durationInMilliSecs":206.9269},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:24.737439300Z","durationInMilliSecs":0.998}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 0016f4b7-df0e-4547-9cfa-429b57013084, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:25 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=0016f4b7-df0e-4547-9cfa-429b57013084, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"6eb526d1/1","parentChannelId":"6eb526d1","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20469 KB","availableMemory":"12488715 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":7,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
2com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientBatch
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 285f827e-0805-473f-bb85-876ebab94b82, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 285f827e-0805-473f-bb85-876ebab94b82, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:17 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=13.462, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234429, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=285f827e-0805-473f-bb85-876ebab94b82, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:16 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"285f827e-0805-473f-bb85-876ebab94b82","requestLatencyInMs":646,"requestStartTimeUTC":"2026-04-16T23:49:16.194764300Z","requestEndTimeUTC":"2026-04-16T23:49:16.840912800Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:16.194764300Z","durationInMilliSecs":504.8791},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:16.699643400Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:16.699643400Z","durationInMilliSecs":1.0085},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:16.700651900Z","durationInMilliSecs":138.2494},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:16.838901300Z","durationInMilliSecs":1.0084}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 285f827e-0805-473f-bb85-876ebab94b82, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:17 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=13.462, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234429, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=285f827e-0805-473f-bb85-876ebab94b82, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"a0827368/1","parentChannelId":"a0827368","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20935 KB","availableMemory":"12488249 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":2,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
Click to show all stack frames -
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 285f827e-0805-473f-bb85-876ebab94b82, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 285f827e-0805-473f-bb85-876ebab94b82, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:17 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=13.462, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234429, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=285f827e-0805-473f-bb85-876ebab94b82, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:16 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"285f827e-0805-473f-bb85-876ebab94b82","requestLatencyInMs":646,"requestStartTimeUTC":"2026-04-16T23:49:16.194764300Z","requestEndTimeUTC":"2026-04-16T23:49:16.840912800Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:16.194764300Z","durationInMilliSecs":504.8791},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:16.699643400Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:16.699643400Z","durationInMilliSecs":1.0085},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:16.700651900Z","durationInMilliSecs":138.2494},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:16.838901300Z","durationInMilliSecs":1.0084}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 285f827e-0805-473f-bb85-876ebab94b82, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:17 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=13.462, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234429, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=285f827e-0805-473f-bb85-876ebab94b82, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"a0827368/1","parentChannelId":"a0827368","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"20935 KB","availableMemory":"12488249 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":2,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientBulk
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 521e4a73-5828-4eab-afca-73c7439bedaa, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 521e4a73-5828-4eab-afca-73c7439bedaa, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:21 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=28.359, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=269721, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=521e4a73-5828-4eab-afca-73c7439bedaa, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:19 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"521e4a73-5828-4eab-afca-73c7439bedaa","requestLatencyInMs":681,"requestStartTimeUTC":"2026-04-16T23:49:19.915931100Z","requestEndTimeUTC":"2026-04-16T23:49:20.597415600Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:19.915931100Z","durationInMilliSecs":490.0903},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:20.406021400Z","durationInMilliSecs":0.5328},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:20.406554200Z","durationInMilliSecs":0.5216},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:20.407075800Z","durationInMilliSecs":189.3395},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:20.596415300Z","durationInMilliSecs":1.0003}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 521e4a73-5828-4eab-afca-73c7439bedaa, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:21 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=28.359, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=269721, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=521e4a73-5828-4eab-afca-73c7439bedaa, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"3b6bfe2e/1","parentChannelId":"3b6bfe2e","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"21395 KB","availableMemory":"12487789 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":5,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
Click to show all stack frames -
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 521e4a73-5828-4eab-afca-73c7439bedaa, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 521e4a73-5828-4eab-afca-73c7439bedaa, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:21 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=28.359, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=269721, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=521e4a73-5828-4eab-afca-73c7439bedaa, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:19 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"521e4a73-5828-4eab-afca-73c7439bedaa","requestLatencyInMs":681,"requestStartTimeUTC":"2026-04-16T23:49:19.915931100Z","requestEndTimeUTC":"2026-04-16T23:49:20.597415600Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:19.915931100Z","durationInMilliSecs":490.0903},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:20.406021400Z","durationInMilliSecs":0.5328},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:20.406554200Z","durationInMilliSecs":0.5216},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:20.407075800Z","durationInMilliSecs":189.3395},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:20.596415300Z","durationInMilliSecs":1.0003}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 521e4a73-5828-4eab-afca-73c7439bedaa, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:21 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=28.359, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=269721, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=521e4a73-5828-4eab-afca-73c7439bedaa, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"3b6bfe2e/1","parentChannelId":"3b6bfe2e","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"21395 KB","availableMemory":"12487789 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":5,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientDocumentPointOperations
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: 94e4536a-2707-4f9d-9538-ff77c0997bfe, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 94e4536a-2707-4f9d-9538-ff77c0997bfe, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:28 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=94e4536a-2707-4f9d-9538-ff77c0997bfe, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:49:26 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"94e4536a-2707-4f9d-9538-ff77c0997bfe","requestLatencyInMs":662,"requestStartTimeUTC":"2026-04-16T23:49:26.731373200Z","requestEndTimeUTC":"2026-04-16T23:49:27.393965600Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:49:26.731373200Z","endTimeUTC":"2026-04-16T23:49:26.731373200Z","durationInMilliSecs":0.0}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:26.732373700Z","durationInMilliSecs":453.43},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:27.185803700Z","durationInMilliSecs":0.647},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:27.186450700Z","durationInMilliSecs":2.0361},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:27.188486800Z","durationInMilliSecs":203.4789},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:27.391965700Z","durationInMilliSecs":0.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 94e4536a-2707-4f9d-9538-ff77c0997bfe, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:28 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=94e4536a-2707-4f9d-9538-ff77c0997bfe, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"974a6f58/1","parentChannelId":"974a6f58","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"21395 KB","availableMemory":"12487789 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":8,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
Click to show all stack frames -
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: 94e4536a-2707-4f9d-9538-ff77c0997bfe, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 94e4536a-2707-4f9d-9538-ff77c0997bfe, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:28 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=94e4536a-2707-4f9d-9538-ff77c0997bfe, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:49:26 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"94e4536a-2707-4f9d-9538-ff77c0997bfe","requestLatencyInMs":662,"requestStartTimeUTC":"2026-04-16T23:49:26.731373200Z","requestEndTimeUTC":"2026-04-16T23:49:27.393965600Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:49:26.731373200Z","endTimeUTC":"2026-04-16T23:49:26.731373200Z","durationInMilliSecs":0.0}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:26.732373700Z","durationInMilliSecs":453.43},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:27.185803700Z","durationInMilliSecs":0.647},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:27.186450700Z","durationInMilliSecs":2.0361},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:27.188486800Z","durationInMilliSecs":203.4789},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:27.391965700Z","durationInMilliSecs":0.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 94e4536a-2707-4f9d-9538-ff77c0997bfe, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:28 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=94e4536a-2707-4f9d-9538-ff77c0997bfe, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"974a6f58/1","parentChannelId":"974a6f58","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"21395 KB","availableMemory":"12487789 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":8,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
2com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientIncrementalChangeFeed
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 7a132354-8448-4b47-bb82-7fa5ab8aa04c, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7a132354-8448-4b47-bb82-7fa5ab8aa04c, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:33 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=24.65, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124701, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7a132354-8448-4b47-bb82-7fa5ab8aa04c, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:32 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"7a132354-8448-4b47-bb82-7fa5ab8aa04c","requestLatencyInMs":657,"requestStartTimeUTC":"2026-04-16T23:49:32.086278100Z","requestEndTimeUTC":"2026-04-16T23:49:32.743913600Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:32.088996200Z","durationInMilliSecs":529.2742},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:32.618270400Z","durationInMilliSecs":1.0098},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:32.619280200Z","durationInMilliSecs":1.0003},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:32.620280500Z","durationInMilliSecs":122.6306},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:32.742911100Z","durationInMilliSecs":1.0025}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7a132354-8448-4b47-bb82-7fa5ab8aa04c, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:33 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=24.65, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124701, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7a132354-8448-4b47-bb82-7fa5ab8aa04c, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"5d66d127/1","parentChannelId":"5d66d127","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"21839 KB","availableMemory":"12487345 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":11,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
Click to show all stack frames -
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 7a132354-8448-4b47-bb82-7fa5ab8aa04c, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7a132354-8448-4b47-bb82-7fa5ab8aa04c, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:33 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=24.65, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124701, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7a132354-8448-4b47-bb82-7fa5ab8aa04c, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:32 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"7a132354-8448-4b47-bb82-7fa5ab8aa04c","requestLatencyInMs":657,"requestStartTimeUTC":"2026-04-16T23:49:32.086278100Z","requestEndTimeUTC":"2026-04-16T23:49:32.743913600Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:32.088996200Z","durationInMilliSecs":529.2742},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:32.618270400Z","durationInMilliSecs":1.0098},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:32.619280200Z","durationInMilliSecs":1.0003},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:32.620280500Z","durationInMilliSecs":122.6306},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:32.742911100Z","durationInMilliSecs":1.0025}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 7a132354-8448-4b47-bb82-7fa5ab8aa04c, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:33 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=24.65, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=124701, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=7a132354-8448-4b47-bb82-7fa5ab8aa04c, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"5d66d127/1","parentChannelId":"5d66d127","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"21839 KB","availableMemory":"12487345 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":11,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientIncrementalChangeFeed
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 3da9007d-6b16-42d4-9118-a1d22b6bccfb, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 3da9007d-6b16-42d4-9118-a1d22b6bccfb, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:32 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=18.244, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234435, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=3da9007d-6b16-42d4-9118-a1d22b6bccfb, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:30 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"3da9007d-6b16-42d4-9118-a1d22b6bccfb","requestLatencyInMs":601,"requestStartTimeUTC":"2026-04-16T23:49:30.706724300Z","requestEndTimeUTC":"2026-04-16T23:49:31.308046400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:30.707967600Z","durationInMilliSecs":468.5958},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:31.176563400Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:31.176563400Z","durationInMilliSecs":2.5253},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:31.179088700Z","durationInMilliSecs":127.7848},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:31.306873500Z","durationInMilliSecs":0.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 3da9007d-6b16-42d4-9118-a1d22b6bccfb, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:32 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=18.244, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234435, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=3da9007d-6b16-42d4-9118-a1d22b6bccfb, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"4e88e961/1","parentChannelId":"4e88e961","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"22288 KB","availableMemory":"12486896 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":10,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
Click to show all stack frames -
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 3da9007d-6b16-42d4-9118-a1d22b6bccfb, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 3da9007d-6b16-42d4-9118-a1d22b6bccfb, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:32 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=18.244, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234435, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=3da9007d-6b16-42d4-9118-a1d22b6bccfb, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:30 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"3da9007d-6b16-42d4-9118-a1d22b6bccfb","requestLatencyInMs":601,"requestStartTimeUTC":"2026-04-16T23:49:30.706724300Z","requestEndTimeUTC":"2026-04-16T23:49:31.308046400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:30.707967600Z","durationInMilliSecs":468.5958},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:31.176563400Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:31.176563400Z","durationInMilliSecs":2.5253},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:31.179088700Z","durationInMilliSecs":127.7848},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:31.306873500Z","durationInMilliSecs":0.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 3da9007d-6b16-42d4-9118-a1d22b6bccfb, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:32 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=18.244, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234435, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=3da9007d-6b16-42d4-9118-a1d22b6bccfb, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"4e88e961/1","parentChannelId":"4e88e961","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"22288 KB","availableMemory":"12486896 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":10,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientBulk
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: d5a97abf-7b00-4001-82ca-f6d4cad418ac, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: d5a97abf-7b00-4001-82ca-f6d4cad418ac, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:20 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=20.305, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134340, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=d5a97abf-7b00-4001-82ca-f6d4cad418ac, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:18 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"d5a97abf-7b00-4001-82ca-f6d4cad418ac","requestLatencyInMs":565,"requestStartTimeUTC":"2026-04-16T23:49:18.683685900Z","requestEndTimeUTC":"2026-04-16T23:49:19.249090Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:18.683685900Z","durationInMilliSecs":440.923},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:19.124608900Z","durationInMilliSecs":0.9974},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:19.125606300Z","durationInMilliSecs":0.9994},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:19.126605700Z","durationInMilliSecs":121.4827},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:19.248088400Z","durationInMilliSecs":1.0016}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: d5a97abf-7b00-4001-82ca-f6d4cad418ac, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:20 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=20.305, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134340, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=d5a97abf-7b00-4001-82ca-f6d4cad418ac, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"e6de7559/1","parentChannelId":"e6de7559","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"22727 KB","availableMemory":"12486457 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":4,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
Click to show all stack frames -
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: d5a97abf-7b00-4001-82ca-f6d4cad418ac, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: d5a97abf-7b00-4001-82ca-f6d4cad418ac, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:20 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=20.305, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134340, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=d5a97abf-7b00-4001-82ca-f6d4cad418ac, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:18 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"d5a97abf-7b00-4001-82ca-f6d4cad418ac","requestLatencyInMs":565,"requestStartTimeUTC":"2026-04-16T23:49:18.683685900Z","requestEndTimeUTC":"2026-04-16T23:49:19.249090Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:18.683685900Z","durationInMilliSecs":440.923},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:19.124608900Z","durationInMilliSecs":0.9974},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:19.125606300Z","durationInMilliSecs":0.9994},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:19.126605700Z","durationInMilliSecs":121.4827},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:19.248088400Z","durationInMilliSecs":1.0016}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: d5a97abf-7b00-4001-82ca-f6d4cad418ac, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:20 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=20.305, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134340, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=d5a97abf-7b00-4001-82ca-f6d4cad418ac, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"e6de7559/1","parentChannelId":"e6de7559","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"22288 KB","availableMemory":"12486896 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":4,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:219)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e
testThinClientQuery
Test class: com.azure.cosmos.implementation.ThinClientE2ETest
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 61c54bb3-2138-48fb-aab7-011d23e7b470, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 61c54bb3-2138-48fb-aab7-011d23e7b470, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:38 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=29.525, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=130033, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=61c54bb3-2138-48fb-aab7-011d23e7b470, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:36 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"61c54bb3-2138-48fb-aab7-011d23e7b470","requestLatencyInMs":757,"requestStartTimeUTC":"2026-04-16T23:49:36.576064900Z","requestEndTimeUTC":"2026-04-16T23:49:37.333931500Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:36.577061500Z","durationInMilliSecs":615.2329},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:37.192294400Z","durationInMilliSecs":1.4507},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:37.193745100Z","durationInMilliSecs":2.0124},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:37.195757500Z","durationInMilliSecs":135.6595},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:37.331417Z","durationInMilliSecs":1.5054}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 61c54bb3-2138-48fb-aab7-011d23e7b470, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:38 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=29.525, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=130033, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=61c54bb3-2138-48fb-aab7-011d23e7b470, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"37e52409/1","parentChannelId":"37e52409","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"22727 KB","availableMemory":"12486457 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":14,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
Click to show all stack frames -
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 61c54bb3-2138-48fb-aab7-011d23e7b470, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 61c54bb3-2138-48fb-aab7-011d23e7b470, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:49:38 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=29.525, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=130033, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=61c54bb3-2138-48fb-aab7-011d23e7b470, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:49:36 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"61c54bb3-2138-48fb-aab7-011d23e7b470","requestLatencyInMs":757,"requestStartTimeUTC":"2026-04-16T23:49:36.576064900Z","requestEndTimeUTC":"2026-04-16T23:49:37.333931500Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:49:36.577061500Z","durationInMilliSecs":615.2329},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:49:37.192294400Z","durationInMilliSecs":1.4507},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:49:37.193745100Z","durationInMilliSecs":2.0124},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:49:37.195757500Z","durationInMilliSecs":135.6595},{"eventName":"received","startTimeUTC":"2026-04-16T23:49:37.331417Z","durationInMilliSecs":1.5054}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 61c54bb3-2138-48fb-aab7-011d23e7b470, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:49:38 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=29.525, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=130033, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=61c54bb3-2138-48fb-aab7-011d23e7b470, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"37e52409/1","parentChannelId":"37e52409","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"22727 KB","availableMemory":"12486457 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":14,"machineId":"uuid:b3cdf150-3cda-4ac2-8395-00b4b1473609","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null,  mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}}
-	at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233)
-	at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565)
-	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208)
-	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
-	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
-	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
-	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
-	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
-	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
-	at java.base/java.lang.Thread.run(Thread.java:833)
-	Suppressed: java.lang.Exception: #block terminated with an error
-		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104)
-		at reactor.core.publisher.Mono.block(Mono.java:1779)
-		at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74)
-		at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
-		at java.base/java.lang.reflect.Method.invoke(Method.java:577)
-		at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:136)
-		at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:658)
-		at org.testng.internal.invokers.TestInvoker.retryFailed(TestInvoker.java:261)
-		at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:62)
-		at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:923)
-		at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:192)
-		at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
-		at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
-		at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
-		at org.testng.TestRunner.privateRun(TestRunner.java:808)
-		at org.testng.TestRunner.run(TestRunner.java:603)
-		at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
-		at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
-		at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
-		at org.testng.SuiteRunner.run(SuiteRunner.java:326)
-		at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
-		at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
-		at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
-		at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
-		at org.testng.TestNG.runSuites(TestNG.java:1092)
-		at org.testng.TestNG.run(TestNG.java:1060)
-		at org.testng.TestNG.privateMain(TestNG.java:1403)
-		at org.testng.TestNG.main(TestNG.java:1367)
-
1com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e

- - \ No newline at end of file diff --git a/test-output/Command line suite/Command line test.xml b/test-output/Command line suite/Command line test.xml deleted file mode 100644 index f9bc520c03e1..000000000000 --- a/test-output/Command line suite/Command line test.xml +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test-output/Command line suite/testng-failed.xml b/test-output/Command line suite/testng-failed.xml deleted file mode 100644 index 3737295542f1..000000000000 --- a/test-output/Command line suite/testng-failed.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/test-output/bullet_point.png b/test-output/bullet_point.png deleted file mode 100644 index 176e6d5b3d64d032e76c493e5811a1cf839220b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 356 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9GG!XV7ZFl&wkP>?0v z(btiIVPjv-@4(4GzCyA`kS_y6l_~>6Lo)-z&;LOBB?CjL0RzLU1O^7H84L{K`IF+0 zx&hVR@^o z&n}1RKn7{UjfWZCs($|cfA#bKkH7!F`St(Z@BiQa{{Qv=|DXRL zz<>l4f3h$#FmN;IfW$y%FtB(Pob+71*X+evXI>YLE;&}Fj8#mRE%&W?B30shyu13% zpT6C#3k-fJGjKF52@24V6I?%GvcZa|)%y<^9(-F=IB9W`k6g3(YLhfsMh0sDZC^x! diff --git a/test-output/emailable-report.html b/test-output/emailable-report.html deleted file mode 100644 index 411879fe3ca5..000000000000 --- a/test-output/emailable-report.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - -TestNG Report - - - - - - - -
Test# Passed# Skipped# Retried# FailedTime (ms)Included GroupsExcluded Groups
Command line suite
Command line test0010526,493thinclient
- -
ClassMethodStartTime (ms)
Command line suite
Command line test — failed
com.azure.cosmos.implementation.ThinClientE2ETesttestThinClientBatch17763833186101347
testThinClientBulk17763833224811304
testThinClientDocumentPointOperations17763833292082457
testThinClientIncrementalChangeFeed17763833341461362
testThinClientQuery17763833379571252
Command line test — retried
com.azure.cosmos.implementation.ThinClientE2ETesttestThinClientBatch17763833127394526
testThinClientBatch
testThinClientBulk17763833212061273
testThinClientBulk
testThinClientDocumentPointOperations17763833265472660
testThinClientDocumentPointOperations
testThinClientIncrementalChangeFeed17763833329481197
testThinClientIncrementalChangeFeed
testThinClientQuery17763833355081249
testThinClientQuery
-

Command line test

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientBatch

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 4ce5124c-3ea1-4f70-a6fe-c51d4de4778b, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 4ce5124c-3ea1-4f70-a6fe-c51d4de4778b, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:40 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=29.855, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=240521, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=4ce5124c-3ea1-4f70-a6fe-c51d4de4778b, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:39 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"4ce5124c-3ea1-4f70-a6fe-c51d4de4778b","requestLatencyInMs":622,"requestStartTimeUTC":"2026-04-16T23:48:39.332992900Z","requestEndTimeUTC":"2026-04-16T23:48:39.955473200Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:39.333999900Z","durationInMilliSecs":484.4468},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:39.818446700Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:39.818446700Z","durationInMilliSecs":1.171},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:39.819617700Z","durationInMilliSecs":133.8428},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:39.953460500Z","durationInMilliSecs":1.0076}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 4ce5124c-3ea1-4f70-a6fe-c51d4de4778b, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:40 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=29.855, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=240521, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=4ce5124c-3ea1-4f70-a6fe-c51d4de4778b, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"7c6f1242/1","parentChannelId":"7c6f1242","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"34394 KB","availableMemory":"12474790 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":3,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} - at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) - at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) - at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) - at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) - at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) - at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - at java.base/java.lang.Thread.run(Thread.java:833) - Suppressed: java.lang.Exception: #block terminated with an error - at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) - at reactor.core.publisher.Mono.block(Mono.java:1779) - at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) -... Removed 24 stack frames

back to summary

-

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientBulk

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 0fa62038-5a61-4ed7-9473-a7c31e63bde9, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 0fa62038-5a61-4ed7-9473-a7c31e63bde9, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:44 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=31.025, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234414, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=0fa62038-5a61-4ed7-9473-a7c31e63bde9, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:43 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"0fa62038-5a61-4ed7-9473-a7c31e63bde9","requestLatencyInMs":698,"requestStartTimeUTC":"2026-04-16T23:48:43.084310600Z","requestEndTimeUTC":"2026-04-16T23:48:43.783290400Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:43.085327200Z","durationInMilliSecs":528.8975},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:43.614224700Z","durationInMilliSecs":0.9985},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:43.615223200Z","durationInMilliSecs":2.0099},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:43.617233100Z","durationInMilliSecs":164.0474},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:43.781280500Z","durationInMilliSecs":1.0206}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 0fa62038-5a61-4ed7-9473-a7c31e63bde9, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:44 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=31.025, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234414, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=0fa62038-5a61-4ed7-9473-a7c31e63bde9, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"4708792e/1","parentChannelId":"4708792e","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"34831 KB","availableMemory":"12474353 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":6,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} - at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) - at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) - at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) - at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) - at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) - at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - at java.base/java.lang.Thread.run(Thread.java:833) - Suppressed: java.lang.Exception: #block terminated with an error - at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) - at reactor.core.publisher.Mono.block(Mono.java:1779) - at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) -... Removed 24 stack frames

back to summary

-

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientDocumentPointOperations

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: dc57288f-6b34-489b-93ee-f2571c376c5f, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: dc57288f-6b34-489b-93ee-f2571c376c5f, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:52 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=dc57288f-6b34-489b-93ee-f2571c376c5f, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:48:50 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"dc57288f-6b34-489b-93ee-f2571c376c5f","requestLatencyInMs":683,"requestStartTimeUTC":"2026-04-16T23:48:50.980473300Z","requestEndTimeUTC":"2026-04-16T23:48:51.664239900Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:48:50.980473300Z","endTimeUTC":"2026-04-16T23:48:50.980473300Z","durationInMilliSecs":0.0}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:50.981473300Z","durationInMilliSecs":483.2608},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:51.464734100Z","durationInMilliSecs":1.0001},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:51.465734200Z","durationInMilliSecs":1.5523},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:51.467286500Z","durationInMilliSecs":194.9529},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:51.662239400Z","durationInMilliSecs":1.0003}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: dc57288f-6b34-489b-93ee-f2571c376c5f, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:52 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=dc57288f-6b34-489b-93ee-f2571c376c5f, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"56096bc6/1","parentChannelId":"56096bc6","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"34831 KB","availableMemory":"12474353 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":9,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} - at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) - at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) - at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) - at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) - at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) - at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - at java.base/java.lang.Thread.run(Thread.java:833) - Suppressed: java.lang.Exception: #block terminated with an error - at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) - at reactor.core.publisher.Mono.block(Mono.java:1779) - at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) -... Removed 24 stack frames

back to summary

-

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientIncrementalChangeFeed

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: d02d2aab-b175-42af-b979-bd343b5ec5a1, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: d02d2aab-b175-42af-b979-bd343b5ec5a1, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:56 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=17.066, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234421, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=d02d2aab-b175-42af-b979-bd343b5ec5a1, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:54 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"d02d2aab-b175-42af-b979-bd343b5ec5a1","requestLatencyInMs":621,"requestStartTimeUTC":"2026-04-16T23:48:54.884982700Z","requestEndTimeUTC":"2026-04-16T23:48:55.506066800Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:54.886058100Z","durationInMilliSecs":471.2518},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:55.357309900Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:55.357309900Z","durationInMilliSecs":1.5067},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:55.358816600Z","durationInMilliSecs":145.7432},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:55.504559800Z","durationInMilliSecs":1.0011}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: d02d2aab-b175-42af-b979-bd343b5ec5a1, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:56 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=17.066, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234421, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=d02d2aab-b175-42af-b979-bd343b5ec5a1, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"f367e4f5/1","parentChannelId":"f367e4f5","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"34831 KB","availableMemory":"12474353 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":12,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} - at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) - at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) - at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) - at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) - at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) - at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - at java.base/java.lang.Thread.run(Thread.java:833) - Suppressed: java.lang.Exception: #block terminated with an error - at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) - at reactor.core.publisher.Mono.block(Mono.java:1779) - at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) -... Removed 24 stack frames

back to summary

-

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientQuery

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: cf4d2b87-cbf4-4a0a-b3c9-a5547c888d90, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: cf4d2b87-cbf4-4a0a-b3c9-a5547c888d90, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:59 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=12.876, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234423, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=cf4d2b87-cbf4-4a0a-b3c9-a5547c888d90, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:58 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"cf4d2b87-cbf4-4a0a-b3c9-a5547c888d90","requestLatencyInMs":663,"requestStartTimeUTC":"2026-04-16T23:48:58.543548300Z","requestEndTimeUTC":"2026-04-16T23:48:59.206604900Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:58.543548300Z","durationInMilliSecs":531.1243},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:59.074672600Z","durationInMilliSecs":1.3653},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:59.076037900Z","durationInMilliSecs":0.0},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:59.076037900Z","durationInMilliSecs":128.5573},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:59.204595200Z","durationInMilliSecs":1.1044}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: cf4d2b87-cbf4-4a0a-b3c9-a5547c888d90, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:59 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=12.876, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234423, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=cf4d2b87-cbf4-4a0a-b3c9-a5547c888d90, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"598c6834/1","parentChannelId":"598c6834","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"35280 KB","availableMemory":"12473904 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":15,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} - at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) - at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) - at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) - at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) - at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) - at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - at java.base/java.lang.Thread.run(Thread.java:833) - Suppressed: java.lang.Exception: #block terminated with an error - at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) - at reactor.core.publisher.Mono.block(Mono.java:1779) - at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) -... Removed 24 stack frames

back to summary

-

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientBatch

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 0b47177c-b4df-43f7-9811-b2bc0a5ed7b9, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 0b47177c-b4df-43f7-9811-b2bc0a5ed7b9, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:37 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=10.819, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=280845, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=0b47177c-b4df-43f7-9811-b2bc0a5ed7b9, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:36 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"0b47177c-b4df-43f7-9811-b2bc0a5ed7b9","requestLatencyInMs":836,"requestStartTimeUTC":"2026-04-16T23:48:36.388735Z","requestEndTimeUTC":"2026-04-16T23:48:37.225571900Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:36.391759600Z","durationInMilliSecs":701.7473},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:37.093506900Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:37.093506900Z","durationInMilliSecs":1.0109},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:37.094517800Z","durationInMilliSecs":124.0545},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:37.218572300Z","durationInMilliSecs":1.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 0b47177c-b4df-43f7-9811-b2bc0a5ed7b9, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:37 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=10.819, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=280845, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=0b47177c-b4df-43f7-9811-b2bc0a5ed7b9, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"c793ec46/1","parentChannelId":"c793ec46","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"35280 KB","availableMemory":"12473904 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":1,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} - at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) - at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) - at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) - at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) - at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) - at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - at java.base/java.lang.Thread.run(Thread.java:833) - Suppressed: java.lang.Exception: #block terminated with an error - at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) - at reactor.core.publisher.Mono.block(Mono.java:1779) - at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) -... Removed 24 stack frames

back to summary

-

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientBatch

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: f3e0bbf0-e156-45a2-b992-3445f4f1d6bd, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: f3e0bbf0-e156-45a2-b992-3445f4f1d6bd, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:39 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=27.741, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234412, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=f3e0bbf0-e156-45a2-b992-3445f4f1d6bd, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:37 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"f3e0bbf0-e156-45a2-b992-3445f4f1d6bd","requestLatencyInMs":676,"requestStartTimeUTC":"2026-04-16T23:48:37.929845200Z","requestEndTimeUTC":"2026-04-16T23:48:38.606156200Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:37.929845200Z","durationInMilliSecs":453.2505},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:38.383095700Z","durationInMilliSecs":1.0053},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:38.384101Z","durationInMilliSecs":0.0},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:38.384101Z","durationInMilliSecs":218.8253},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:38.602926300Z","durationInMilliSecs":2.0081}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: f3e0bbf0-e156-45a2-b992-3445f4f1d6bd, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:39 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=27.741, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234412, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=f3e0bbf0-e156-45a2-b992-3445f4f1d6bd, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"32956711/1","parentChannelId":"32956711","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"35727 KB","availableMemory":"12473457 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":2,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} - at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) - at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) - at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) - at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) - at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) - at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - at java.base/java.lang.Thread.run(Thread.java:833) - Suppressed: java.lang.Exception: #block terminated with an error - at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) - at reactor.core.publisher.Mono.block(Mono.java:1779) - at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBatch(ThinClientE2ETest.java:176) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) -... Removed 24 stack frames

back to summary

-

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientBulk

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 44f74e10-4be7-486e-9360-bc3b6214cb57, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 44f74e10-4be7-486e-9360-bc3b6214cb57, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:43 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=20.934, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=231740, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=44f74e10-4be7-486e-9360-bc3b6214cb57, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:41 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"44f74e10-4be7-486e-9360-bc3b6214cb57","requestLatencyInMs":719,"requestStartTimeUTC":"2026-04-16T23:48:41.759068800Z","requestEndTimeUTC":"2026-04-16T23:48:42.478218800Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:41.759068800Z","durationInMilliSecs":546.807},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:42.305875800Z","durationInMilliSecs":1.318},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:42.307193800Z","durationInMilliSecs":1.0176},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:42.308211400Z","durationInMilliSecs":167.4951},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:42.475706500Z","durationInMilliSecs":1.5053}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 44f74e10-4be7-486e-9360-bc3b6214cb57, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:43 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=20.934, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=231740, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=44f74e10-4be7-486e-9360-bc3b6214cb57, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"817172af/1","parentChannelId":"817172af","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"35727 KB","availableMemory":"12473457 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":5,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} - at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) - at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) - at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) - at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) - at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) - at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - at java.base/java.lang.Thread.run(Thread.java:833) - Suppressed: java.lang.Exception: #block terminated with an error - at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) - at reactor.core.publisher.Mono.block(Mono.java:1779) - at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) -... Removed 24 stack frames

back to summary

-

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientBulk

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: ab1311b3-318f-4474-b959-6a0acf4fd966, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: ab1311b3-318f-4474-b959-6a0acf4fd966, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:42 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=28.942, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=237237, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=ab1311b3-318f-4474-b959-6a0acf4fd966, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:40 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"ab1311b3-318f-4474-b959-6a0acf4fd966","requestLatencyInMs":612,"requestStartTimeUTC":"2026-04-16T23:48:40.582060Z","requestEndTimeUTC":"2026-04-16T23:48:41.194815200Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:40.583053700Z","durationInMilliSecs":479.3876},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:41.062441300Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:41.062441300Z","durationInMilliSecs":2.0021},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:41.064443400Z","durationInMilliSecs":127.3234},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:41.191766800Z","durationInMilliSecs":2.0086}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: ab1311b3-318f-4474-b959-6a0acf4fd966, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:42 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=28.942, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=237237, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=ab1311b3-318f-4474-b959-6a0acf4fd966, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"09bdb406/1","parentChannelId":"09bdb406","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"35727 KB","availableMemory":"12473457 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":4,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Eventual, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} - at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) - at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) - at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) - at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) - at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) - at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - at java.base/java.lang.Thread.run(Thread.java:833) - Suppressed: java.lang.Exception: #block terminated with an error - at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) - at reactor.core.publisher.Mono.block(Mono.java:1779) - at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientBulk(ThinClientE2ETest.java:126) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) -... Removed 24 stack frames

back to summary

-

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientDocumentPointOperations

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: 7c0b99fd-2248-4d04-a28b-384b88ad9628, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 7c0b99fd-2248-4d04-a28b-384b88ad9628, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:49 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=7c0b99fd-2248-4d04-a28b-384b88ad9628, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:48:48 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"7c0b99fd-2248-4d04-a28b-384b88ad9628","requestLatencyInMs":655,"requestStartTimeUTC":"2026-04-16T23:48:48.548799Z","requestEndTimeUTC":"2026-04-16T23:48:49.203810800Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:48:48.549815900Z","endTimeUTC":"2026-04-16T23:48:48.550828900Z","durationInMilliSecs":1.013}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:48.551839600Z","durationInMilliSecs":447.0778},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:48.998917400Z","durationInMilliSecs":1.0291},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:48.999946500Z","durationInMilliSecs":1.9986},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:49.001945100Z","durationInMilliSecs":197.8683},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:49.199813400Z","durationInMilliSecs":0.9965}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: 7c0b99fd-2248-4d04-a28b-384b88ad9628, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:49 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=7c0b99fd-2248-4d04-a28b-384b88ad9628, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"77fc9838/1","parentChannelId":"77fc9838","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"36170 KB","availableMemory":"12473014 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":8,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} - at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) - at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) - at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) - at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) - at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) - at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - at java.base/java.lang.Thread.run(Thread.java:833) - Suppressed: java.lang.Exception: #block terminated with an error - at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) - at reactor.core.publisher.Mono.block(Mono.java:1779) - at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) -... Removed 24 stack frames

back to summary

-

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientDocumentPointOperations

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":400,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","error":"{\"code\":\"BadRequest\",\"message\":\"Setting offer throughput or autopilot on container is not supported for serverless accounts.\\r\\nActivityId: f6c8fa96-915a-4c58-bde7-bc5395a38fbd, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest\",\"additionalErrorInfo\":null}","innerErrorMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: f6c8fa96-915a-4c58-bde7-bc5395a38fbd, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:47 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=f6c8fa96-915a-4c58-bde7-bc5395a38fbd, strict-transport-security=max-age=31536000}","requestHeaders":"[x-ms-cosmos-sdk-supportedcapabilities=3, Accept=application/json, x-ms-date=Thu, 16 Apr 2026 23:48:45 GMT, x-ms-offer-throughput=35000, Content-Type=application/json]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"f6c8fa96-915a-4c58-bde7-bc5395a38fbd","requestLatencyInMs":760,"requestStartTimeUTC":"2026-04-16T23:48:45.772415400Z","requestEndTimeUTC":"2026-04-16T23:48:46.533097100Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":[{"serializationType":"CONTAINER_SERIALIZATION","startTimeUTC":"2026-04-16T23:48:45.773013200Z","endTimeUTC":"2026-04-16T23:48:45.776021400Z","durationInMilliSecs":3.0082}]},"gatewayStatisticsList":[{"sessionToken":null,"operationType":"Create","resourceType":"DocumentCollection","statusCode":400,"subStatusCode":0,"requestCharge":0.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:45.780020500Z","durationInMilliSecs":543.6743},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:46.323694800Z","durationInMilliSecs":0.995},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:46.324689800Z","durationInMilliSecs":4.0011},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:46.328690900Z","durationInMilliSecs":192.8744},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:46.521565300Z","durationInMilliSecs":0.9997}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Setting offer throughput or autopilot on container is not supported for serverless accounts.\r\nActivityId: f6c8fa96-915a-4c58-bde7-bc5395a38fbd, Microsoft.Azure.Documents.Common/2.14.0, StatusCode: BadRequest","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:47 GMT, x-http2-stream-id=3, server=Microsoft-HTTPAPI/2.0, content-length=219, x-ms-gatewayversion=version=2.14.0, content-type=application/json, x-ms-activity-id=f6c8fa96-915a-4c58-bde7-bc5395a38fbd, strict-transport-security=max-age=31536000}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"0c3fee42/1","parentChannelId":"0c3fee42","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"36170 KB","availableMemory":"12473014 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":7,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} - at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) - at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) - at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) - at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) - at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) - at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - at java.base/java.lang.Thread.run(Thread.java:833) - Suppressed: java.lang.Exception: #block terminated with an error - at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) - at reactor.core.publisher.Mono.block(Mono.java:1779) - at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientDocumentPointOperations(ThinClientE2ETest.java:292) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) -... Removed 24 stack frames

back to summary

-

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientIncrementalChangeFeed

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: a8d2cea1-23d9-4d07-ae87-412132f729fe, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a8d2cea1-23d9-4d07-ae87-412132f729fe, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:55 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=28.08, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=273617, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a8d2cea1-23d9-4d07-ae87-412132f729fe, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:53 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"a8d2cea1-23d9-4d07-ae87-412132f729fe","requestLatencyInMs":668,"requestStartTimeUTC":"2026-04-16T23:48:53.475059900Z","requestEndTimeUTC":"2026-04-16T23:48:54.143448300Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:53.475059900Z","durationInMilliSecs":466.2609},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:53.941320800Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:53.941320800Z","durationInMilliSecs":1.0166},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:53.942337400Z","durationInMilliSecs":198.1097},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:54.140447100Z","durationInMilliSecs":1.0599}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: a8d2cea1-23d9-4d07-ae87-412132f729fe, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:55 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=28.08, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=273617, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=a8d2cea1-23d9-4d07-ae87-412132f729fe, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"1a30e0c8/1","parentChannelId":"1a30e0c8","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"36170 KB","availableMemory":"12473014 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":11,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} - at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) - at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) - at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) - at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) - at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) - at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - at java.base/java.lang.Thread.run(Thread.java:833) - Suppressed: java.lang.Exception: #block terminated with an error - at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) - at reactor.core.publisher.Mono.block(Mono.java:1779) - at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) -... Removed 24 stack frames

back to summary

-

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientIncrementalChangeFeed

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: c95b1753-1617-488c-93ec-2da6778ed0bd, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: c95b1753-1617-488c-93ec-2da6778ed0bd, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:53 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=16.899, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=269717, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=c95b1753-1617-488c-93ec-2da6778ed0bd, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:52 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"c95b1753-1617-488c-93ec-2da6778ed0bd","requestLatencyInMs":656,"requestStartTimeUTC":"2026-04-16T23:48:52.287741400Z","requestEndTimeUTC":"2026-04-16T23:48:52.944144100Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:52.288850100Z","durationInMilliSecs":452.8209},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:52.741671Z","durationInMilliSecs":0.0},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:52.741671Z","durationInMilliSecs":1.097},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:52.742768Z","durationInMilliSecs":200.3781},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:52.943146100Z","durationInMilliSecs":0.0}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: c95b1753-1617-488c-93ec-2da6778ed0bd, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977687s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:53 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Wed, 01 Apr 2026 06:40:07.166 GMT, x-ms-request-duration-ms=16.899, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=269717, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=c95b1753-1617-488c-93ec-2da6778ed0bd, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=2, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"32fd8282/1","parentChannelId":"32fd8282","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"36638 KB","availableMemory":"12472546 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":10,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} - at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) - at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) - at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) - at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) - at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) - at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - at java.base/java.lang.Thread.run(Thread.java:833) - Suppressed: java.lang.Exception: #block terminated with an error - at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) - at reactor.core.publisher.Mono.block(Mono.java:1779) - at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientIncrementalChangeFeed(ThinClientE2ETest.java:223) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) -... Removed 24 stack frames

back to summary

-

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientQuery

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: cea76829-4b46-4319-9c1a-34b54fa2f505, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: cea76829-4b46-4319-9c1a-34b54fa2f505, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:57 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=17.795, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134337, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=cea76829-4b46-4319-9c1a-34b54fa2f505, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:56 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"cea76829-4b46-4319-9c1a-34b54fa2f505","requestLatencyInMs":596,"requestStartTimeUTC":"2026-04-16T23:48:56.159256700Z","requestEndTimeUTC":"2026-04-16T23:48:56.755409700Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:56.159256700Z","durationInMilliSecs":463.4909},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:56.622747600Z","durationInMilliSecs":1.43},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:56.624177600Z","durationInMilliSecs":0.0},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:56.624177600Z","durationInMilliSecs":129.8336},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:56.754011200Z","durationInMilliSecs":1.3985}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: cea76829-4b46-4319-9c1a-34b54fa2f505, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977689s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:57 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Sat, 28 Mar 2026 22:42:07.841 GMT, x-ms-request-duration-ms=17.795, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=134337, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=cea76829-4b46-4319-9c1a-34b54fa2f505, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"88e0d729/1","parentChannelId":"88e0d729","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"36638 KB","availableMemory":"12472546 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":13,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} - at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) - at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) - at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) - at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) - at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) - at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - at java.base/java.lang.Thread.run(Thread.java:833) - Suppressed: java.lang.Exception: #block terminated with an error - at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) - at reactor.core.publisher.Mono.block(Mono.java:1779) - at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) -... Removed 24 stack frames

back to summary

-

com.azure.cosmos.implementation.ThinClientE2ETest#testThinClientQuery

Exception
{"ClassName":"CosmosException","userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1","statusCode":404,"resourceAddress":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","error":"{\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 0904c85b-9bbe-4c5b-be9d-b58f18729c11, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound\",\"additionalErrorInfo\":null}","innerErrorMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 0904c85b-9bbe-4c5b-be9d-b58f18729c11, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","causeInfo":null,"responseHeaders":"{date=Thu, 16 Apr 2026 23:48:58 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=25.908, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234422, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=0904c85b-9bbe-4c5b-be9d-b58f18729c11, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0, x-ms-substatus=1003}","requestHeaders":"[x-ms-date=Thu, 16 Apr 2026 23:48:57 GMT]","cosmosDiagnostics":{"userAgent":"azsdk-java-cosmos/4.80.0-beta.1 Windows11/10.0 JRE/18.0.2.1|F14","activityId":"0904c85b-9bbe-4c5b-be9d-b58f18729c11","requestLatencyInMs":595,"requestStartTimeUTC":"2026-04-16T23:48:57.358787900Z","requestEndTimeUTC":"2026-04-16T23:48:57.954284600Z","responseStatisticsList":[],"supplementalResponseStatisticsList":[],"addressResolutionStatistics":{},"regionsContacted":["north europe"],"retryContext":{"statusAndSubStatusCodes":null,"retryCount":0,"retryLatency":0},"metadataDiagnosticsContext":{"metadataDiagnosticList":null,"empty":true},"serializationDiagnosticsContext":{"serializationDiagnosticsList":null},"gatewayStatisticsList":[{"sessionToken":"0:-1#99","operationType":"Read","resourceType":"DocumentCollection","statusCode":404,"subStatusCode":0,"requestCharge":2.0,"requestTimeline":[{"eventName":"connectionCreated","startTimeUTC":"2026-04-16T23:48:57.359388400Z","durationInMilliSecs":464.1591},{"eventName":"connectionConfigured","startTimeUTC":"2026-04-16T23:48:57.823547500Z","durationInMilliSecs":1.4824},{"eventName":"requestSent","startTimeUTC":"2026-04-16T23:48:57.825029900Z","durationInMilliSecs":0.5932},{"eventName":"transitTime","startTimeUTC":"2026-04-16T23:48:57.825623100Z","durationInMilliSecs":126.6546},{"eventName":"received","startTimeUTC":"2026-04-16T23:48:57.952277700Z","durationInMilliSecs":1.0072}],"partitionKeyRangeId":null,"responsePayloadSizeInBytes":0,"httpNetworkResponseTimeout":"PT1M","exceptionMessage":"Message: {\"Errors\":[\"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found\"]}\r\nActivityId: 0904c85b-9bbe-4c5b-be9d-b58f18729c11, Request URI: /apps/e5edab09-e651-4b3c-a603-1230655f3d07/services/4b24e143-71b7-47e6-91ee-08e7b832ec07/partitions/b66d394c-e21e-4313-8c8d-d26074fbeec7/replicas/134185142045977688s, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, StatusCode: NotFound","exceptionResponseHeaders":"{date=Thu, 16 Apr 2026 23:48:58 GMT, server=Microsoft-HTTPAPI/2.0, content-length=423, x-ms-last-state-change-utc=Tue, 31 Mar 2026 23:45:26.872 GMT, x-ms-request-duration-ms=25.908, x-ms-session-token=0:-1#99, lsn=99, x-ms-request-charge=2, x-ms-schemaversion=1.21, x-ms-transport-request-id=234422, x-ms-number-of-read-regions=0, x-ms-cosmos-internal-partition-id=b66d394c-e21e-4313-8c8d-d26074fbeec7, x-ms-activity-id=0904c85b-9bbe-4c5b-be9d-b58f18729c11, strict-transport-security=max-age=31536000, x-http2-stream-id=3, x-ms-xp-role=1, x-ms-global-committed-lsn=99, x-ms-cosmos-llsn=99, x-ms-gatewayversion=version=2.14.0, content-location=https://swkrish-session-northeurope.documents-test.windows-int.net/dbs/db1/colls/c2, content-type=application/json, x-ms-serviceversion=version=2.14.0.0}","endpoint":"https://swkrish-session-northeurope.documents-test.windows-int.net:443/dbs/db1/colls/c2","isHubRegionProcessingOnly":"false","perPartitionCircuitBreakerInfoHolder":{"perPartitionCircuitBreakerInfoHolder":null},"perPartitionAutomaticFailoverInfoHolder":null,"channelId":"5424b6d5/1","parentChannelId":"5424b6d5","isHttp2":true}],"samplingRateSnapshot":1.0,"bloomFilterInsertionCountSnapshot":0,"systemInformation":{"usedMemory":"36638 KB","availableMemory":"12472546 KB","systemCpuLoad":"empty","availableProcessors":8},"clientCfgs":{"id":14,"machineId":"uuid:aabb364a-80c6-4b4c-ae65-e31bae48b35b","connectionMode":"GATEWAY","numberOfClients":0,"isPpafEnabled":"false","isFalseProgSessionTokenMergeEnabled":"true","excrgns":"[]","clientEndpoints":{"https://swkrish-session.documents-test.windows-int.net:443/":15},"connCfg":{"rntbd":null,"gw":"(cps:1000, nrto:PT1M, icto:PT1M, cto:PT45S, gwV2Cto:PT5S, p:false, http2:(enabled:true, maxc:1000, minc:8, maxs:30))","other":"(ed: true, cs: false, rv: true)"},"consistencyCfg":"(consistency: Session, readConsistencyStrategy: null, mm: true, prgns: [])","proactiveInitCfg":"","e2ePolicyCfg":"","sessionRetryCfg":""}}} - at com.azure.cosmos.BridgeInternal.createCosmosException(BridgeInternal.java:425) - at com.azure.cosmos.implementation.RxGatewayStoreModel.validateOrThrow(RxGatewayStoreModel.java:779) - at com.azure.cosmos.implementation.RxGatewayStoreModel.unwrapToStoreResponse(RxGatewayStoreModel.java:233) - at com.azure.cosmos.implementation.RxGatewayStoreModel.lambda$toDocumentServiceResponse$4(RxGatewayStoreModel.java:565) - at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:208) - at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) - at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) - at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) - at java.base/java.lang.Thread.run(Thread.java:833) - Suppressed: java.lang.Exception: #block terminated with an error - at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:104) - at reactor.core.publisher.Mono.block(Mono.java:1779) - at com.azure.cosmos.implementation.ThinClientE2ETest.testThinClientQuery(ThinClientE2ETest.java:74) - at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) -... Removed 24 stack frames

back to summary

- - diff --git a/test-output/failed.png b/test-output/failed.png deleted file mode 100644 index c117be59a9ecd1da15ebf48f6b7f53496302a7cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 977 zcmV;?11|iDP)4Tx0C)j~RNrgUP!#^!Wu36$i#lf!2|j3%Ze&w*L!7p2SGvtw>Nd9_NSmf@ zT$;ut?S8Na*^6&F#dq-sKKTa>*@JI;k`2ZbVfd_wB24xov!0tYO(#d#()tZ$I5%3%!zLYh@BH>w}XODA7?mkV}ap}jU$$3 zG&Mk)3Bm`(LOM&hKscCb;PVaG&Vdx+MpZJHTQ(R_;DA31$+jOGBoLXk_De?ey1m!ik&_4G zH9n^))_*|$z4!HUisgBd@awc5jn(v9k~&t~+vLrrBg4dZQ9lDnLV}JQWGLW~LJVP= zW5lZXOcog;N~F?hbX0k=IMzETla}oqM|jC!4!B+x^;@#I_Tc-T-6hwKycLDTx1-om z?X`jFy0R0R8-I0SrK4`)H@W4T8*Qr#2vPou<*`U!Wy(*2QP*`g=8#jD{B;Y@GL-Hm zb`n?&x~%YC_$q7)PlXr4m%r4=&fcvN%Ybn#KC7Nn&Bp8{(oE9pWVpYI^+LuN`H(R~ zTAjWmO`M83^4d@fCkA(d>*nHIFV_d2yUbnT`nd?LE^;G|!WZ>Ld?E0@Grm4ww{M7H zr`x{MWb30bTI;*hk-DO>dX$gbC-yy#suLNqvA(f>RtPJ!qGM`Gvvf}Y10`)vm-7Xa z?-7Ixe2A_siI1ydSCCID3U8SVUY86>uSnT0use_K1GZDvUFKY)t}F* z)!pahe+zh{{06Bb3f97*Uorpy0B%V{K~yLeW4y>F|DS;bz(j&tuu`}Ny`K+o>P41= zYq-R&z$-w|z14sZ}6S`uM8b)lMhS`K{GDtB9px6Kr!cSsofH?!*c`##8 zG{6+YB(Z6NYd}|wOA}U4!xUqq;Wl8C#3lv+hIuOk>aOmJ00000NkvXXu0mjfn+D0# diff --git a/test-output/index.html b/test-output/index.html deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/test-output/jquery.min.js b/test-output/jquery.min.js deleted file mode 100644 index b0614034ad3a..000000000000 --- a/test-output/jquery.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test-output/junitreports/TEST-com.azure.cosmos.implementation.ConsistencyFlagContentionTest.xml b/test-output/junitreports/TEST-com.azure.cosmos.implementation.ConsistencyFlagContentionTest.xml deleted file mode 100644 index 889610ae08d3..000000000000 --- a/test-output/junitreports/TEST-com.azure.cosmos.implementation.ConsistencyFlagContentionTest.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientE2ETest.xml b/test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientE2ETest.xml deleted file mode 100644 index 95fcc7944245..000000000000 --- a/test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientE2ETest.xml +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientReadConsistencyStrategyE2ETest.xml b/test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientReadConsistencyStrategyE2ETest.xml deleted file mode 100644 index 7bb9e681c684..000000000000 --- a/test-output/junitreports/TEST-com.azure.cosmos.implementation.ThinClientReadConsistencyStrategyE2ETest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test-output/navigator-bullet.png b/test-output/navigator-bullet.png deleted file mode 100644 index 36d90d395c51912e718b89dd88b4a3fb53aa1d85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 352 zcmV-m0iXVfP)G5@hw44>$jtc^drBsEhr7 z^X9?-KzfCWMC0vWtek#CBxB+XG+nX0$0e)!py)g%*!C9F3xb^$q9zV zJJ-RS;)J3Q3>X<0IJnsvq?E-OUUR%-Sh{}$*!>`a1>MbzjEoGd?5qriD%uRz5+)#_ z=~xvqF)}e2@@p|@3aYFDDdOf=+lQf0fP;_0P2842gi~-LkXsB?^cOvN)>U@o{(tlO y5-4a&(SrsYdr*b0AjKdWn<5ZqBsQ)A0t^5xc9&6bK}yU30000 - -Class name -Method name -Groups - -com.azure.cosmos.implementation.ThinClientE2ETest -   - -@Test - - -  -testThinClientIncrementalChangeFeed -thinclient - - -  -testThinClientBatch -thinclient - - -  -testThinClientDocumentPointOperations -thinclient - - -  -testThinClientBulk -thinclient - - -  -testThinClientQuery -thinclient - - -@BeforeClass - - -@BeforeMethod - - -@AfterMethod - - -@AfterClass - - diff --git a/test-output/old/Command line suite/groups.html b/test-output/old/Command line suite/groups.html deleted file mode 100644 index e30a4cb58070..000000000000 --- a/test-output/old/Command line suite/groups.html +++ /dev/null @@ -1,3 +0,0 @@ -

Groups used for this test run

- -
Group nameMethods
thinclientThinClientE2ETest.testThinClientIncrementalChangeFeed()[pri:0, instance:com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e]
ThinClientE2ETest.testThinClientQuery()[pri:0, instance:com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e]
ThinClientE2ETest.testThinClientBatch()[pri:0, instance:com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e]
ThinClientE2ETest.testThinClientDocumentPointOperations()[pri:0, instance:com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e]
ThinClientE2ETest.testThinClientBulk()[pri:0, instance:com.azure.cosmos.implementation.ThinClientE2ETest@4e31276e]
diff --git a/test-output/old/Command line suite/index.html b/test-output/old/Command line suite/index.html deleted file mode 100644 index 3577bd28a9f6..000000000000 --- a/test-output/old/Command line suite/index.html +++ /dev/null @@ -1,6 +0,0 @@ -Results for Command line suite - - - - - diff --git a/test-output/old/Command line suite/main.html b/test-output/old/Command line suite/main.html deleted file mode 100644 index 0ee4b5b499ac..000000000000 --- a/test-output/old/Command line suite/main.html +++ /dev/null @@ -1,2 +0,0 @@ -Results for Command line suite -Select a result on the left-hand pane. diff --git a/test-output/old/Command line suite/methods-alphabetical.html b/test-output/old/Command line suite/methods-alphabetical.html deleted file mode 100644 index a3acc0beb0dd..000000000000 --- a/test-output/old/Command line suite/methods-alphabetical.html +++ /dev/null @@ -1,34 +0,0 @@ -

Methods run, sorted chronologically

>> means before, << means after


Command line suite

(Hover the method name to see the test class name)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
26/04/16 19:49:16 0      testThinClientBatchmain@1510467688
26/04/16 19:49:16 0      testThinClientBatchmain@1510467688
26/04/16 19:49:16 0      testThinClientBatchmain@1510467688
26/04/16 19:49:20 3754      testThinClientBulkmain@1510467688
26/04/16 19:49:20 3754      testThinClientBulkmain@1510467688
26/04/16 19:49:20 3754      testThinClientBulkmain@1510467688
26/04/16 19:49:27 10555      testThinClientDocumentPointOperationsmain@1510467688
26/04/16 19:49:27 10555      testThinClientDocumentPointOperationsmain@1510467688
26/04/16 19:49:27 10555      testThinClientDocumentPointOperationsmain@1510467688
26/04/16 19:49:32 15904      testThinClientIncrementalChangeFeedmain@1510467688
26/04/16 19:49:32 15904      testThinClientIncrementalChangeFeedmain@1510467688
26/04/16 19:49:32 15904      testThinClientIncrementalChangeFeedmain@1510467688
26/04/16 19:49:37 20506      testThinClientQuerymain@1510467688
26/04/16 19:49:37 20506      testThinClientQuerymain@1510467688
26/04/16 19:49:37 20506      testThinClientQuerymain@1510467688
diff --git a/test-output/old/Command line suite/methods-not-run.html b/test-output/old/Command line suite/methods-not-run.html deleted file mode 100644 index 54b14cb854b6..000000000000 --- a/test-output/old/Command line suite/methods-not-run.html +++ /dev/null @@ -1,2 +0,0 @@ -

Methods that were not run

-
\ No newline at end of file diff --git a/test-output/old/Command line suite/methods.html b/test-output/old/Command line suite/methods.html deleted file mode 100644 index ef15b17dad39..000000000000 --- a/test-output/old/Command line suite/methods.html +++ /dev/null @@ -1,34 +0,0 @@ -

Methods run, sorted chronologically

>> means before, << means after


Command line suite

(Hover the method name to see the test class name)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
26/04/16 19:49:16 0      testThinClientBatchmain@1510467688
26/04/16 19:49:27 10555      testThinClientDocumentPointOperationsmain@1510467688
26/04/16 19:49:16 0      testThinClientBatchmain@1510467688
26/04/16 19:49:20 3754      testThinClientBulkmain@1510467688
26/04/16 19:49:16 0      testThinClientBatchmain@1510467688
26/04/16 19:49:32 15904      testThinClientIncrementalChangeFeedmain@1510467688
26/04/16 19:49:20 3754      testThinClientBulkmain@1510467688
26/04/16 19:49:37 20506      testThinClientQuerymain@1510467688
26/04/16 19:49:27 10555      testThinClientDocumentPointOperationsmain@1510467688
26/04/16 19:49:37 20506      testThinClientQuerymain@1510467688
26/04/16 19:49:27 10555      testThinClientDocumentPointOperationsmain@1510467688
26/04/16 19:49:20 3754      testThinClientBulkmain@1510467688
26/04/16 19:49:32 15904      testThinClientIncrementalChangeFeedmain@1510467688
26/04/16 19:49:37 20506      testThinClientQuerymain@1510467688
26/04/16 19:49:32 15904      testThinClientIncrementalChangeFeedmain@1510467688
diff --git a/test-output/old/Command line suite/reporter-output.html b/test-output/old/Command line suite/reporter-output.html deleted file mode 100644 index 063bc2e96fd0..000000000000 --- a/test-output/old/Command line suite/reporter-output.html +++ /dev/null @@ -1 +0,0 @@ -

Reporter output

\ No newline at end of file diff --git a/test-output/old/Command line suite/testng.xml.html b/test-output/old/Command line suite/testng.xml.html deleted file mode 100644 index fce06257443b..000000000000 --- a/test-output/old/Command line suite/testng.xml.html +++ /dev/null @@ -1 +0,0 @@ -testng.xml for Command line suite<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite name="Command line suite" verbose="2">
  <groups>
    <run>
      <include name="thinclient"/>
    </run>
  </groups>
  <test thread-count="5" name="Command line test" verbose="2">
    <classes>
      <class name="com.azure.cosmos.implementation.ThinClientE2ETest"/>
    </classes>
  </test> <!-- Command line test -->
</suite> <!-- Command line suite -->
\ No newline at end of file diff --git a/test-output/old/Command line suite/toc.html b/test-output/old/Command line suite/toc.html deleted file mode 100644 index 5306781cbc98..000000000000 --- a/test-output/old/Command line suite/toc.html +++ /dev/null @@ -1,30 +0,0 @@ - - -Results for Command line suite - - - - -

Results for
Command line suite

- - - - - - - - - - -
1 test1 class5 methods:
-  chronological
-  alphabetical
-  not run (0)
1 groupreporter outputtestng.xml
- -

-

-
Command line test (0/5/10) - Results -
-
- \ No newline at end of file diff --git a/test-output/old/index.html b/test-output/old/index.html deleted file mode 100644 index a5293a03e4ba..000000000000 --- a/test-output/old/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - -

Test results

- - - -
SuitePassedFailedSkippedtestng.xml
Total0510 
Command line suite0510Link
diff --git a/test-output/passed.png b/test-output/passed.png deleted file mode 100644 index 45e85bbfd0f5e85def14b896cfd4331675be2759..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1019 zcmV4Tx0C)j~RNrgUP!#^!Wu36$i#lf!2|j3%Ze&w*L!7p2SGvtw>Nd9_NSmf@ zT$;ut?S8Na*^6&F#dq-sKKTa>*@JI;k`2ZbVfd_wB24xov!0tYO(#d#()tZ$I5%3%!zLYh@BH>w}XODA7?mkV}ap}jU$$3 zG&Mk)3Bm`(LOM&hKscCb;PVaG&Vdx+MpZJHTQ(R_;DA31$+jOGBoLXk_De?ey1m!ik&_4G zH9n^))_*|$z4!HUisgBd@awc5jn(v9k~&t~+vLrrBg4dZQ9lDnLV}JQWGLW~LJVP= zW5lZXOcog;N~F?hbX0k=IMzETla}oqM|jC!4!B+x^;@#I_Tc-T-6hwKycLDTx1-om z?X`jFy0R0R8-I0SrK4`)H@W4T8*Qr#2vPou<*`U!Wy(*2QP*`g=8#jD{B;Y@GL-Hm zb`n?&x~%YC_$q7)PlXr4m%r4=&fcvN%Ybn#KC7Nn&Bp8{(oE9pWVpYI^+LuN`H(R~ zTAjWmO`M83^4d@fCkA(d>*nHIFV_d2yUbnT`nd?LE^;G|!WZ>Ld?E0@Grm4ww{M7H zr`x{MWb30bTI;*hk-DO>dX$gbC-yy#suLNqvA(f>RtPJ!qGM`Gvvf}Y10`)vm-7Xa z?-7Ixe2A_siI1ydSCCID3U8SVUY86>uSnT0use_K1GZDvUFKY)t}F* z)!pahe+zh{{06Bb3f97*Uorpy0GLTcK~yLeW0ahz`=5aXz(j&tuu_sWu%O#uE8~VD zl&lrR;HF{4AT>#kuni$fu3*LaYg^!kpg8GS-X(?~-@n6gsDV2}@4opAtDmldYd~=l z$fS+YQyErY*vatm`)9DCL(k8^6@wTk8o(y4Wnh>XTmx2AyLA%7m+#+DG@v*MBy;8c pT?UXs5IFYyJeWo%7zba(0RWt9G$oT4y{G^H002ovPDHLkV1nS74Tx0C)j~RNrgUP!#^!Wu36$i#lf!2|j3%Ze&w*L!7p2SGvtw>Nd9_NSmf@ zT$;ut?S8Na*^6&F#dq-sKKTa>*@JI;k`2ZbVfd_wB24xov!0tYO(#d#()tZ$I5%3%!zLYh@BH>w}XODA7?mkV}ap}jU$$3 zG&Mk)3Bm`(LOM&hKscCb;PVaG&Vdx+MpZJHTQ(R_;DA31$+jOGBoLXk_De?ey1m!ik&_4G zH9n^))_*|$z4!HUisgBd@awc5jn(v9k~&t~+vLrrBg4dZQ9lDnLV}JQWGLW~LJVP= zW5lZXOcog;N~F?hbX0k=IMzETla}oqM|jC!4!B+x^;@#I_Tc-T-6hwKycLDTx1-om z?X`jFy0R0R8-I0SrK4`)H@W4T8*Qr#2vPou<*`U!Wy(*2QP*`g=8#jD{B;Y@GL-Hm zb`n?&x~%YC_$q7)PlXr4m%r4=&fcvN%Ybn#KC7Nn&Bp8{(oE9pWVpYI^+LuN`H(R~ zTAjWmO`M83^4d@fCkA(d>*nHIFV_d2yUbnT`nd?LE^;G|!WZ>Ld?E0@Grm4ww{M7H zr`x{MWb30bTI;*hk-DO>dX$gbC-yy#suLNqvA(f>RtPJ!qGM`Gvvf}Y10`)vm-7Xa z?-7Ixe2A_siI1ydSCCID3U8SVUY86>uSnT0use_K1GZDvUFKY)t}F* z)!pahe+zh{{06Bb3f97*Uorpy0Axu-K~yLeV|;sz;XeZjfQbaPV5M*kLYBBKLY9MT zcz2wU0a*fOGe`_12Lo^oAOUnu=!!vVSU?0aK-Pq8GE5DM4KP7`G=>J4GmvdUHULEf pOfgIWHcfC1=!$V^Vx)OY0{~v*D#slo71{s*002ovPDHLkV1jLYy!8M8 diff --git a/test-output/testng-failed.xml b/test-output/testng-failed.xml deleted file mode 100644 index 3737295542f1..000000000000 --- a/test-output/testng-failed.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/test-output/testng-reports.css b/test-output/testng-reports.css deleted file mode 100644 index d7b75c404782..000000000000 --- a/test-output/testng-reports.css +++ /dev/null @@ -1,326 +0,0 @@ -body { - margin: 0 0 5px 5px; -} - -ul { - margin: 0; -} - -li { - list-style-type: none; -} - -a { - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -.navigator-selected { - background: #ffa500; -} - -.wrapper { - position: absolute; - top: 60px; - bottom: 0; - left: 400px; - right: 0; - overflow: auto; -} - -.navigator-root { - position: absolute; - top: 60px; - bottom: 0; - left: 0; - width: 400px; - overflow-y: auto; -} - -.suite { - margin: 0 10px 10px 0; - background-color: #fff8dc; -} - -.suite-name { - padding-left: 10px; - font-size: 25px; - font-family: Times, sans-serif; -} - -.main-panel-header { - padding: 5px; - background-color: #9FB4D9; /*afeeee*/; - font-family: monospace; - font-size: 18px; -} - -.main-panel-content { - padding: 5px; - margin-bottom: 10px; - background-color: #DEE8FC; /*d0ffff*/; -} - -.rounded-window { - border-radius: 10px; - border-style: solid; - border-width: 1px; -} - -.rounded-window-top { - border-top-right-radius: 10px 10px; - border-top-left-radius: 10px 10px; - border-style: solid; - border-width: 1px; - overflow: auto; -} - -.light-rounded-window-top { - border-top-right-radius: 10px 10px; - border-top-left-radius: 10px 10px; -} - -.rounded-window-bottom { - border-style: solid; - border-width: 0 1px 1px 1px; - border-bottom-right-radius: 10px 10px; - border-bottom-left-radius: 10px 10px; - overflow: auto; -} - -.method-name { - font-size: 12px; - font-family: monospace; -} - -.method-content { - border-style: solid; - border-width: 0 0 1px 0; - margin-bottom: 10px; - padding-bottom: 5px; - width: 80%; -} - -.parameters { - font-size: 14px; - font-family: monospace; -} - -.stack-trace { - white-space: pre; - font-family: monospace; - font-size: 12px; - font-weight: bold; - margin-top: 0; - margin-left: 20px; -} - -.testng-xml { - font-family: monospace; -} - -.method-list-content { - margin-left: 10px; -} - -.navigator-suite-content { - margin-left: 10px; - font: 12px 'Lucida Grande'; -} - -.suite-section-title { - margin-top: 10px; - width: 80%; - border-style: solid; - border-width: 1px 0 0 0; - font-family: Times, sans-serif; - font-size: 18px; - font-weight: bold; -} - -.suite-section-content { - list-style-image: url(bullet_point.png); -} - -.top-banner-root { - position: absolute; - top: 0; - height: 45px; - left: 0; - right: 0; - padding: 5px; - margin: 0 0 5px 0; - background-color: #0066ff; - font-family: Times, sans-serif; - color: #fff; - text-align: center; -} -.button{ - position: absolute; - margin-left:500px; - margin-top:8px; - background-color: white; - color:#0066ff; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-weight:bold; - border-color:#0066ff ; - border-radius:25px; - cursor: pointer; - height:30px; - width:150px; - outline:none; - -} - -.top-banner-title-font { - font-size: 25px; -} - -.test-name { - font-family: 'Lucida Grande', sans-serif; - font-size: 16px; -} - -.suite-icon { - padding: 5px; - float: right; - height: 20px; -} - -.test-group { - font: 20px 'Lucida Grande'; - margin: 5px 5px 10px 5px; - border-width: 0 0 1px 0; - border-style: solid; - padding: 5px; -} - -.test-group-name { - font-weight: bold; -} - -.method-in-group { - font-size: 16px; - margin-left: 80px; -} - -table.google-visualization-table-table { - width: 100%; -} - -.reporter-method-name { - font-size: 14px; - font-family: monospace; -} - -.reporter-method-output-div { - padding: 5px; - margin: 0 0 5px 20px; - font-size: 12px; - font-family: monospace; - border-width: 0 0 0 1px; - border-style: solid; -} - -.ignored-class-div { - font-size: 14px; - font-family: monospace; -} - -.ignored-methods-div { - padding: 5px; - margin: 0 0 5px 20px; - font-size: 12px; - font-family: monospace; - border-width: 0 0 0 1px; - border-style: solid; -} - -.border-failed { - border-top-left-radius: 10px 10px; - border-bottom-left-radius: 10px 10px; - border-style: solid; - border-width: 0 0 0 10px; - border-color: #f00; -} - -.border-skipped { - border-top-left-radius: 10px 10px; - border-bottom-left-radius: 10px 10px; - border-style: solid; - border-width: 0 0 0 10px; - border-color: #edc600; -} - -.border-passed { - border-top-left-radius: 10px 10px; - border-bottom-left-radius: 10px 10px; - border-style: solid; - border-width: 0 0 0 10px; - border-color: #19f52d; -} - -.times-div { - text-align: center; - padding: 5px; -} - -.suite-total-time { - font: 16px 'Lucida Grande'; -} - -.configuration-suite { - margin-left: 20px; -} - -.configuration-test { - margin-left: 40px; -} - -.configuration-class { - margin-left: 60px; -} - -.configuration-method { - margin-left: 80px; -} - -.test-method { - margin-left: 100px; -} - -.chronological-class { - background-color: skyblue; - border-style: solid; - border-width: 0 0 1px 1px; -} - -.method-start { - float: right; -} - -.chronological-class-name { - padding: 0 0 0 5px; - color: #008; -} - -.after, .before, .test-method { - font-family: monospace; - font-size: 14px; -} - -.navigator-suite-header { - font-size: 22px; - margin: 0 10px 5px 0; - background-color: #deb887; - text-align: center; -} - -.collapse-all-icon { - padding: 5px; - float: right; -} -/*retro Theme*/ diff --git a/test-output/testng-reports.js b/test-output/testng-reports.js deleted file mode 100644 index c1a84a35d453..000000000000 --- a/test-output/testng-reports.js +++ /dev/null @@ -1,122 +0,0 @@ -$(document).ready(function() { - $('a.navigator-link').on("click", function() { - // Extract the panel for this link - var panel = getPanelName($(this)); - - // Mark this link as currently selected - $('.navigator-link').parent().removeClass('navigator-selected'); - $(this).parent().addClass('navigator-selected'); - - showPanel(panel); - }); - - installMethodHandlers('failed'); - installMethodHandlers('skipped'); - installMethodHandlers('passed', true); // hide passed methods by default - - $('a.method').on("click", function() { - showMethod($(this)); - return false; - }); - - // Hide all the panels and display the first one (do this last - // to make sure the click() will invoke the listeners) - $('.panel').hide(); - $('.navigator-link').first().trigger("click"); - - // Collapse/expand the suites - $('a.collapse-all-link').on("click", function() { - var contents = $('.navigator-suite-content'); - if (contents.css('display') == 'none') { - contents.show(); - } else { - contents.hide(); - } - }); -}); - -// The handlers that take care of showing/hiding the methods -function installMethodHandlers(name, hide) { - function getContent(t) { - return $('.method-list-content.' + name + "." + t.attr('panel-name')); - } - - function getHideLink(t, name) { - var s = 'a.hide-methods.' + name + "." + t.attr('panel-name'); - return $(s); - } - - function getShowLink(t, name) { - return $('a.show-methods.' + name + "." + t.attr('panel-name')); - } - - function getMethodPanelClassSel(element, name) { - var panelName = getPanelName(element); - var sel = '.' + panelName + "-class-" + name; - return $(sel); - } - - $('a.hide-methods.' + name).on("click", function() { - var w = getContent($(this)); - w.hide(); - getHideLink($(this), name).hide(); - getShowLink($(this), name).show(); - getMethodPanelClassSel($(this), name).hide(); - }); - - $('a.show-methods.' + name).on("click", function() { - var w = getContent($(this)); - w.show(); - getHideLink($(this), name).show(); - getShowLink($(this), name).hide(); - showPanel(getPanelName($(this))); - getMethodPanelClassSel($(this), name).show(); - }); - - if (hide) { - $('a.hide-methods.' + name).trigger("click"); - } else { - $('a.show-methods.' + name).trigger("click"); - } -} - -function getHashForMethod(element) { - return element.attr('hash-for-method'); -} - -function getPanelName(element) { - return element.attr('panel-name'); -} - -function showPanel(panelName) { - $('.panel').hide(); - var panel = $('.panel[panel-name="' + panelName + '"]'); - panel.show(); -} - -function showMethod(element) { - var hashTag = getHashForMethod(element); - var panelName = getPanelName(element); - showPanel(panelName); - var current = document.location.href; - var base = current.substring(0, current.indexOf('#')) - document.location.href = base + '#' + hashTag; - var newPosition = $(document).scrollTop() - 65; - $(document).scrollTop(newPosition); -} - -function drawTable() { - for (var i = 0; i < suiteTableInitFunctions.length; i++) { - window[suiteTableInitFunctions[i]](); - } - - for (var k in window.suiteTableData) { - var v = window.suiteTableData[k]; - var div = v.tableDiv; - var data = v.tableData - var table = new google.visualization.Table(document.getElementById(div)); - table.draw(data, { - showRowNumber : false - }); - } -} diff --git a/test-output/testng-reports1.css b/test-output/testng-reports1.css deleted file mode 100644 index 570323ffb8fe..000000000000 --- a/test-output/testng-reports1.css +++ /dev/null @@ -1,344 +0,0 @@ -body { - background-color: whitesmoke; - margin: 0 0 5px 5px; -} -ul { - margin-top: 10px; - margin-left:-10px; -} - li { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - padding:5px 5px; - } - a { - text-decoration: none; - color: black; - font-size: 14px; - } - - a:hover { - color:black ; - text-decoration: underline; - } - - .navigator-selected { - /* #ffa500; Mouse hover color after click Orange.*/ - background:#027368 - } - - .wrapper { - position: absolute; - top: 60px; - bottom: 0; - left: 400px; - right: 0; - margin-right:9px; - overflow: auto;/*imortant*/ - } - - .navigator-root { - position: absolute; - top: 60px; - bottom: 0; - left: 0; - width: 400px; - overflow-y: auto;/*important*/ - } - - .suite { - margin: -5px 10px 10px 5px; - background-color: whitesmoke ;/*Colour of the left bside box*/ - } - - .suite-name { - font-size: 24px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;/*All TEST SUITE*/ - color: white; - } - - .main-panel-header { - padding: 5px; - background-color: #027368; /*afeeee*/; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - color:white; - font-size: 18px; - } - - .main-panel-content { - padding: 5px; - margin-bottom: 10px; - background-color: #CCD0D1; /*d0ffff*/; /*Belongs to backGround of rightSide boxes*/ - } - - .rounded-window { - border-style: dotted; - border-width: 1px;/*Border of left Side box*/ - background-color: whitesmoke; - border-radius: 10px; - } - - .rounded-window-top { - border-top-right-radius: 10px 10px; - border-top-left-radius: 10px 10px; - border-style: solid; - border-width: 1px; - overflow: auto;/*Top of RightSide box*/ - } - - .light-rounded-window-top { - background-color: #027368; - padding-left:120px; - border-radius: 10px; - - } - - .rounded-window-bottom { - border-bottom-right-radius: 10px 10px; - border-bottom-left-radius: 10px 10px; - overflow: auto;/*Bottom of rightSide box*/ - } - - .method-name { - font-size: 14px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-weight: bold; - } - - .method-content { - border-style: solid; - border-width: 0 0 1px 0; - margin-bottom: 10px; - padding-bottom: 5px; - width: 100%; - } - - .parameters { - font-size: 14px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - } - - .stack-trace { - white-space: pre; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 12px; - font-weight: bold; - margin-top: 0; - margin-left: 20px; /*Error Stack Trace Message*/ - } - - .testng-xml { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - } - - .method-list-content { - margin-left: 10px; - } - - .navigator-suite-content { - margin-left: 10px; - font: 12px 'Lucida Grande'; - } - - .suite-section-title { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - font-weight:bold; - background-color: #8C8887; - margin-left: -10px; - margin-top:10px; - padding:6px; - } - - .suite-section-content { - list-style-image: url(bullet_point.png); - background-color: whitesmoke; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - overflow: hidden; - } - - .top-banner-root { - position: absolute; - top: 0; - height: 45px; - left: 0; - right: 0; - padding: 5px; - margin: 0 0 5px 0; - background-color: #027368; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 18px; - color: #fff; - text-align: center;/*Belongs to the Top of Report*//*Status: - Completed*/ - } - - .top-banner-title-font { - font-size: 25px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - padding: 3px; - float: right; - } - - .test-name { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 16px; - } - - .suite-icon { - padding: 5px; - float: right; - height: 20px; - } - - .test-group { - font: 20px 'Lucida Grande'; - margin: 5px 5px 10px 5px; - border-width: 0 0 1px 0; - border-style: solid; - padding: 5px; - } - - .test-group-name { - font-weight: bold; - } - - .method-in-group { - font-size: 16px; - margin-left: 80px; - } - - table.google-visualization-table-table { - width: 100%; - } - - .reporter-method-name { - font-size: 14px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - } - - .reporter-method-output-div { - padding: 5px; - margin: 0 0 5px 20px; - font-size: 12px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - border-width: 0 0 0 1px; - border-style: solid; - } - - .ignored-class-div { - font-size: 14px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - } - - .ignored-methods-div { - padding: 5px; - margin: 0 0 5px 20px; - font-size: 12px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - border-width: 0 0 0 1px; - border-style: solid; - } - - .border-failed { - border-radius:2px; - border-style: solid; - border-width: 0 0 0 10px; - border-color: #F20505; - } - - .border-skipped { - border-radius:2px; - border-style: solid; - border-width: 0 0 0 10px; - border-color: #F2BE22; - } - - .border-passed { - border-radius:2px; - border-style: solid; - border-width: 0 0 0 10px; - border-color: #038C73; - } - - .times-div { - text-align: center; - padding: 5px; - } - - .suite-total-time { - font: 16px 'Lucida Grande'; - } - - .configuration-suite { - margin-left: 20px; - } - - .configuration-test { - margin-left: 40px; - } - - .configuration-class { - margin-left: 60px; - } - - .configuration-method { - margin-left: 80px; - } - - .test-method { - margin-left: 100px; - } - - .chronological-class { - background-color: #CCD0D1; - border-width: 0 0 1px 1px;/*Chronological*/ - } - - .method-start { - float: right; - } - - .chronological-class-name { - padding: 0 0 0 5px; - margin-top:5px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - color: #008; - } - - .after, .before, .test-method { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - margin-top:5px; - } - - .navigator-suite-header { - font-size: 18px; - margin: 0px 10px 10px 5px; - padding: 5px; - border-radius: 10px; - background-color: #027368; - color: white; - font-weight:bold; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - text-align: center; /*All Suites on top of left box*//*Status: -Completed*/ - } - - .collapse-all-icon { - padding: 3px; - float: right; - } - .button{ - position: absolute; - margin-left:500px; - margin-top:8px; - background-color: white; - color:#027368; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-weight:bold; - border-color:#027368; - border-radius:25px; - cursor: pointer; - height:30px; - width:150px; - outline: none; -} -/*Author: - Akhil Gullapalli*/ \ No newline at end of file diff --git a/test-output/testng-reports2.js b/test-output/testng-reports2.js deleted file mode 100644 index 5342859fa4df..000000000000 --- a/test-output/testng-reports2.js +++ /dev/null @@ -1,76 +0,0 @@ -window.onload = function () { - let cookies = document.cookie; - let cookieValue = cookies.split('='); - if (cookieValue[1] === 'null' || localStorage.getItem('Theme') === 'null') { - document.getElementById('retro').setAttribute('disabled', 'false'); - } else if (cookieValue[1] === 'Switch Ultra Theme' || - localStorage.getItem('Theme') === 'Switch Ultra Theme') { - document.getElementById('button').innerText = "Switch Retro Theme"; - document.getElementById('retro').setAttribute('disabled', 'false'); - - } else if (cookieValue[1] === 'Switch Retro Theme' || - localStorage.getItem('Theme') === 'Switch Retro Theme') { - if (cookieValue[1] === 'Switch Ultra Theme' || - localStorage.getItem('Theme') === 'Switch Ultra Theme') { - document.getElementById('button').innerText = "Switch Retro Theme"; - document.getElementById('retro').setAttribute('disabled', 'false'); - - document.getElementById('button').innerText = "Switch Ultra Theme"; - document.getElementById('retro').removeAttribute('disabled'); - document.getElementById('ultra').setAttribute('disabled', 'false'); - localStorage.setItem('Theme', select); - - } else if (select === 'Switch Ultra Theme') { - document.getElementById('button').innerText = "Switch Retro Theme"; - document.getElementById('ultra').removeAttribute('disabled'); - document.getElementById('retro').setAttribute('disabled', 'false'); - localStorage.setItem('Theme', select); - } - } else if (cookieValue[1] === 'Switch Retro Theme' || - localStorage.getItem('Theme') === 'Switch Retro Theme') { - document.getElementById('button').innerText = "Switch Ultra Theme"; - document.getElementById('ultra').setAttribute('disabled', 'false'); - } -} -document.getElementById('button').onclick = function () { - let select = document.getElementById('button').innerText; - if (select === 'Switch Retro Theme') { - let d = new Date(); - days = 365; - d.setTime(+d + (days * 86400000)); //24 * 60 * 60 * 1000 - document.cookie = "Theme =" + select + "; expires=" + d.toGMTString() + ";"; - document.getElementById('button').innerText = "Switch Ultra Theme"; - document.getElementById('retro').removeAttribute('disabled'); - document.getElementById('ultra').setAttribute('disabled', 'false'); - localStorage.setItem('Theme', select); - - } else if (select === 'Switch Ultra Theme') { - let d = new Date(); - days = 365; - d.setTime(+d + (days * 86400000)); //24 * 60 * 60 * 1000 - document.cookie = "Theme =" + select + "; expires=" + d.toGMTString() + ";"; - document.getElementById('button').innerText = "Switch Retro Theme"; - document.getElementById('ultra').removeAttribute('disabled'); - document.getElementById('retro').setAttribute('disabled', 'false'); - localStorage.setItem('Theme', select); - } -} -//Function to mouse hovering affect. -document.getElementById('button').onmouseover = function () { - document.getElementById('button').style.borderRadius = "25px"; - document.getElementById('button').style.width = "180px"; - document.getElementById('button').style.height = "45px"; - document.getElementById('button').style.marginTop = "1px"; - -} -//Function to mouse out affect -document.getElementById('button').onmouseout = function () { - document.getElementById('button').style.borderRadius = "25px"; - document.getElementById('button').style.width = "150px"; - document.getElementById('button').style.height = "30px"; - document.getElementById('button').style.marginTop = "8px"; - -} - -//This is the file where we handle the switching of the Themes. -/*Author:- Akhil Gullapalli*/ diff --git a/test-output/testng-results.xml b/test-output/testng-results.xml deleted file mode 100644 index 3cb120d3055e..000000000000 --- a/test-output/testng-results.xml +++ /dev/null @@ -1,845 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test-output/testng.css b/test-output/testng.css deleted file mode 100644 index 5124ba863b37..000000000000 --- a/test-output/testng.css +++ /dev/null @@ -1,9 +0,0 @@ -.invocation-failed, .test-failed { background-color: #DD0000; } -.invocation-percent, .test-percent { background-color: #006600; } -.invocation-passed, .test-passed { background-color: #00AA00; } -.invocation-skipped, .test-skipped { background-color: #CCCC00; } - -.main-page { - font-size: x-large; -} - From 486347e486f1c198daed4ec8f269fe64e080378e Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 23 Apr 2026 17:27:10 -0400 Subject: [PATCH 20/46] Replace FQN GatewayConnectionConfig with import (#48094) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../ReadConsistencyStrategyHttpSpyWireTest.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java index b1608654106c..ede359fe8050 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java @@ -8,6 +8,7 @@ import com.azure.cosmos.CosmosAsyncDatabase; import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.CosmosItemSerializer; +import com.azure.cosmos.GatewayConnectionConfig; import com.azure.cosmos.ReadConsistencyStrategy; import com.azure.cosmos.implementation.http.HttpRequest; import com.azure.cosmos.models.CosmosClientTelemetryConfig; @@ -79,7 +80,7 @@ public void beforeClass() { container.createItem(doc).block(); // Build the spy client (low-level AsyncDocumentClient with HTTP interceptor) - ConnectionPolicy gwPolicy = new ConnectionPolicy(com.azure.cosmos.GatewayConnectionConfig.getDefaultConfig()); + ConnectionPolicy gwPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); try { spyClient = SpyClientUnderTestFactory.createClientUnderTest( @@ -158,7 +159,7 @@ public void readItem_withClientLevelReadConsistencyStrategy_headerOnWire() { String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); - ConnectionPolicy gwPolicy = new ConnectionPolicy(com.azure.cosmos.GatewayConnectionConfig.getDefaultConfig()); + ConnectionPolicy gwPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); SpyClientUnderTestFactory.ClientUnderTest readConsistencyStrategyClient; try { @@ -251,7 +252,7 @@ public void writeItem_withClientLevelReadConsistencyStrategy_noReadConsistencySt String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); - ConnectionPolicy gwPolicy = new ConnectionPolicy(com.azure.cosmos.GatewayConnectionConfig.getDefaultConfig()); + ConnectionPolicy gwPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); SpyClientUnderTestFactory.ClientUnderTest readConsistencyStrategyClient; try { @@ -298,7 +299,7 @@ public void readItem_requestLevelOverridesClientLevel_onlyRequestLevelOnWire() { String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); - ConnectionPolicy gwPolicy = new ConnectionPolicy(com.azure.cosmos.GatewayConnectionConfig.getDefaultConfig()); + ConnectionPolicy gwPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); // Client-level readConsistencyStrategy = EVENTUAL SpyClientUnderTestFactory.ClientUnderTest clientLevelReadConsistencyStrategyClient; @@ -349,7 +350,7 @@ public void readItem_withClientLevelDefaultReadConsistencyStrategy_noReadConsist String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); - ConnectionPolicy gwPolicy = new ConnectionPolicy(com.azure.cosmos.GatewayConnectionConfig.getDefaultConfig()); + ConnectionPolicy gwPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); // Client-level readConsistencyStrategy = DEFAULT (transparent — should not appear on wire) SpyClientUnderTestFactory.ClientUnderTest defaultReadConsistencyStrategyClient; From 879552ba151c342300c9702555496d3bf224ab4d Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 23 Apr 2026 17:35:56 -0400 Subject: [PATCH 21/46] Replace FQN HttpRequest with import in RntbdReadConsistencyStrategyHeaderTests (#48094) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../RntbdReadConsistencyStrategyHeaderTests.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java index e50f2df94c48..93617c2bf653 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java @@ -14,6 +14,7 @@ import com.azure.cosmos.implementation.ThinClientStoreModel; import com.azure.cosmos.implementation.UserAgentContainer; import com.azure.cosmos.implementation.PartitionKeyRange; +import com.azure.cosmos.implementation.http.HttpRequest; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import org.mockito.Mockito; @@ -151,7 +152,7 @@ public void thinClient_wrapInHttpRequest_readConsistencyStrategyEncodedInRntbdFr request.getHeaders().put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, readConsistencyStrategyValue); request.getHeaders().remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); - com.azure.cosmos.implementation.http.HttpRequest httpRequest = + HttpRequest httpRequest = storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); byte[] rntbdFrame = collectHttpBody(httpRequest); @@ -173,7 +174,7 @@ public void thinClient_wrapInHttpRequest_noReadConsistencyStrategyHeader_noRntbd RxDocumentServiceRequest request = createDocumentReadRequest(); // No readConsistencyStrategy header set - com.azure.cosmos.implementation.http.HttpRequest httpRequest = + HttpRequest httpRequest = storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); byte[] rntbdFrame = collectHttpBody(httpRequest); @@ -195,7 +196,7 @@ public void thinClient_wrapInHttpRequest_readConsistencyStrategyPresent_clAbsent request.getHeaders().put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, "LatestCommitted"); request.getHeaders().remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); - com.azure.cosmos.implementation.http.HttpRequest httpRequest = + HttpRequest httpRequest = storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); byte[] rntbdFrame = collectHttpBody(httpRequest); @@ -230,7 +231,7 @@ public void thinClient_resolveAndWrap_bothClAndReadConsistencyStrategy_onlyReadC resolveEffectiveConsistencyHeaders(request); // Now call wrapInHttpRequest with the resolved headers - com.azure.cosmos.implementation.http.HttpRequest httpRequest = + HttpRequest httpRequest = storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); byte[] rntbdFrame = collectHttpBody(httpRequest); @@ -259,7 +260,7 @@ public void thinClient_resolveAndWrap_requestContextReadConsistencyStrategy_over resolveEffectiveConsistencyHeaders(request); - com.azure.cosmos.implementation.http.HttpRequest httpRequest = + HttpRequest httpRequest = storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); byte[] rntbdFrame = collectHttpBody(httpRequest); @@ -288,7 +289,7 @@ public void thinClient_resolveAndWrap_defaultReadConsistencyStrategy_clSurvives( resolveEffectiveConsistencyHeaders(request); - com.azure.cosmos.implementation.http.HttpRequest httpRequest = + HttpRequest httpRequest = storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); byte[] rntbdFrame = collectHttpBody(httpRequest); @@ -337,7 +338,7 @@ private static RxDocumentServiceRequest createDocumentReadRequest() { return request; } - private static byte[] collectHttpBody(com.azure.cosmos.implementation.http.HttpRequest httpRequest) { + private static byte[] collectHttpBody(HttpRequest httpRequest) { return httpRequest.body().reduce((a, b) -> { byte[] merged = new byte[a.length + b.length]; System.arraycopy(a, 0, merged, 0, a.length); From f05b3c35709d5f84536b70f98a2aa3d1261cb53d Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 23 Apr 2026 18:05:42 -0400 Subject: [PATCH 22/46] Eliminate simulated resolveEffectiveConsistencyHeaders in tests (#48094) Extract static resolveEffectiveConsistencyHeaders(headers, readConsistencyStrategy) from RxGatewayStoreModel so tests call the real production code instead of duplicated simulation logic. Removes ~60 lines of test-only copies that could silently diverge from the production method. - ConsistencyFlagContentionTest: calls RxGatewayStoreModel.resolveEffectiveConsistencyHeaders directly - RntbdReadConsistencyStrategyHeaderTests: delegates to the same method - RxGatewayStoreModel: private instance method delegates to public static overload Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../ConsistencyFlagContentionTest.java | 63 +++---------------- ...tbdReadConsistencyStrategyHeaderTests.java | 39 ++---------- .../implementation/RxGatewayStoreModel.java | 20 ++++-- 3 files changed, 30 insertions(+), 92 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java index ee25c7692194..cecd26c25c46 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java @@ -77,7 +77,7 @@ public void resolve_requestContextReadConsistencyStrategy_stripsCl() { DocumentServiceRequestContext ctx = new DocumentServiceRequestContext(); ctx.readConsistencyStrategy = ReadConsistencyStrategy.LATEST_COMMITTED; - simulateResolve(headers, ctx); + RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, ctx.readConsistencyStrategy); assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) @@ -92,7 +92,7 @@ public void resolve_headerReadConsistencyStrategy_stripsCl() { headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, ReadConsistencyStrategy.EVENTUAL.toString()); - simulateResolve(headers, new DocumentServiceRequestContext()); + RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) @@ -107,10 +107,7 @@ public void resolve_requestContextReadConsistencyStrategy_overridesHeaderReadCon ReadConsistencyStrategy.EVENTUAL.toString()); headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.EVENTUAL.toString()); - DocumentServiceRequestContext ctx = new DocumentServiceRequestContext(); - ctx.readConsistencyStrategy = ReadConsistencyStrategy.SESSION; - - simulateResolve(headers, ctx); + RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, ReadConsistencyStrategy.SESSION); assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) @@ -123,10 +120,7 @@ public void resolve_defaultReadConsistencyStrategy_clSurvives() { Map headers = new HashMap<>(); headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.BOUNDED_STALENESS.toString()); - DocumentServiceRequestContext ctx = new DocumentServiceRequestContext(); - ctx.readConsistencyStrategy = ReadConsistencyStrategy.DEFAULT; - - simulateResolve(headers, ctx); + RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, ReadConsistencyStrategy.DEFAULT); assertThat(headers.get(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) .isEqualTo("BoundedStaleness"); @@ -139,10 +133,7 @@ public void resolve_nullReadConsistencyStrategy_clSurvives() { Map headers = new HashMap<>(); headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.STRONG.toString()); - DocumentServiceRequestContext ctx = new DocumentServiceRequestContext(); - // readConsistencyStrategy is null by default - - simulateResolve(headers, ctx); + RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); assertThat(headers.get(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) .isEqualTo("Strong"); @@ -154,7 +145,7 @@ public void resolve_noHeaders_noOp() { // When neither CL nor readConsistencyStrategy is set, resolution is a no-op. Map headers = new HashMap<>(); - simulateResolve(headers, new DocumentServiceRequestContext()); + RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); assertThat(headers).isEmpty(); } @@ -168,11 +159,9 @@ public void resolve_idempotent_multipleInvocations() { headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, ReadConsistencyStrategy.LATEST_COMMITTED.toString()); - DocumentServiceRequestContext ctx = new DocumentServiceRequestContext(); - - simulateResolve(headers, ctx); - simulateResolve(headers, ctx); - simulateResolve(headers, ctx); + RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); + RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); + RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) @@ -180,38 +169,4 @@ public void resolve_idempotent_multipleInvocations() { } // endregion - - /** - * Simulates the resolveEffectiveConsistencyHeaders logic from RxGatewayStoreModel. - * This mirrors the private method exactly to enable unit testing without constructing - * the full gateway store model infrastructure. - */ - private static void simulateResolve(Map headers, DocumentServiceRequestContext ctx) { - ReadConsistencyStrategy effectiveReadConsistencyStrategy = null; - - if (ctx != null - && ctx.readConsistencyStrategy != null - && ctx.readConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { - effectiveReadConsistencyStrategy = ctx.readConsistencyStrategy; - } - - if (effectiveReadConsistencyStrategy == null) { - String readConsistencyStrategyHeaderValue = headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY); - if (readConsistencyStrategyHeaderValue != null && !readConsistencyStrategyHeaderValue.isEmpty()) { - effectiveReadConsistencyStrategy = ReadConsistencyStrategy.DEFAULT; - for (ReadConsistencyStrategy candidate : ReadConsistencyStrategy.values()) { - if (candidate != ReadConsistencyStrategy.DEFAULT - && candidate.toString().equals(readConsistencyStrategyHeaderValue)) { - effectiveReadConsistencyStrategy = candidate; - break; - } - } - } - } - - if (effectiveReadConsistencyStrategy != null && effectiveReadConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { - headers.remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); - headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, effectiveReadConsistencyStrategy.toString()); - } - } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java index 93617c2bf653..9ad16116b303 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java @@ -11,9 +11,11 @@ import com.azure.cosmos.implementation.OperationType; import com.azure.cosmos.implementation.ResourceType; import com.azure.cosmos.implementation.RxDocumentServiceRequest; +import com.azure.cosmos.implementation.RxGatewayStoreModel; import com.azure.cosmos.implementation.ThinClientStoreModel; import com.azure.cosmos.implementation.UserAgentContainer; import com.azure.cosmos.implementation.PartitionKeyRange; +import com.azure.cosmos.implementation.http.HttpClient; import com.azure.cosmos.implementation.http.HttpRequest; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; @@ -325,7 +327,7 @@ private static ThinClientStoreModel createMockThinClientStoreModel() { ConsistencyLevel.SESSION, new UserAgentContainer(), mockGem, - Mockito.mock(com.azure.cosmos.implementation.http.HttpClient.class)); + Mockito.mock(HttpClient.class)); } private static RxDocumentServiceRequest createDocumentReadRequest() { @@ -347,39 +349,10 @@ private static byte[] collectHttpBody(HttpRequest httpRequest) { }).block(); } - /** - * Mirrors RxGatewayStoreModel.resolveEffectiveConsistencyHeaders() exactly. - * This is the centralized contention resolution that runs in performRequestInternalCore() - * before wrapInHttpRequest() is called. - */ private static void resolveEffectiveConsistencyHeaders(RxDocumentServiceRequest request) { - Map headers = request.getHeaders(); - - ReadConsistencyStrategy effectiveReadConsistencyStrategy = null; - if (request.requestContext != null - && request.requestContext.readConsistencyStrategy != null - && request.requestContext.readConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { - effectiveReadConsistencyStrategy = request.requestContext.readConsistencyStrategy; - } - - if (effectiveReadConsistencyStrategy == null) { - String readConsistencyStrategyHeaderValue = headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY); - if (readConsistencyStrategyHeaderValue != null && !readConsistencyStrategyHeaderValue.isEmpty()) { - effectiveReadConsistencyStrategy = ReadConsistencyStrategy.DEFAULT; - for (ReadConsistencyStrategy candidate : ReadConsistencyStrategy.values()) { - if (candidate != ReadConsistencyStrategy.DEFAULT - && candidate.toString().equals(readConsistencyStrategyHeaderValue)) { - effectiveReadConsistencyStrategy = candidate; - break; - } - } - } - } - - if (effectiveReadConsistencyStrategy != null && effectiveReadConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { - headers.remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); - headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, effectiveReadConsistencyStrategy.toString()); - } + RxGatewayStoreModel.resolveEffectiveConsistencyHeaders( + request.getHeaders(), + request.requestContext != null ? request.requestContext.readConsistencyStrategy : null); } // region RNTBD frame helpers diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java index 3ec46a2feda5..ea2c8f0010cc 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java @@ -337,14 +337,24 @@ public Mono performRequestInternal(RxDocumentServiceR * performing the same removal is safe. */ private void resolveEffectiveConsistencyHeaders(RxDocumentServiceRequest request) { - Map headers = request.getHeaders(); + resolveEffectiveConsistencyHeaders( + request.getHeaders(), + request.requestContext != null ? request.requestContext.readConsistencyStrategy : null); + } + + /** + * Core resolution logic — public for direct unit testing from cross-package test classes. + * Avoids test drift from duplicated simulation logic. + */ + public static void resolveEffectiveConsistencyHeaders( + Map headers, + ReadConsistencyStrategy requestContextReadConsistencyStrategy) { // Determine effective readConsistencyStrategy: requestContext (request-level) takes priority over header (client-level) ReadConsistencyStrategy effectiveReadConsistencyStrategy = null; - if (request.requestContext != null - && request.requestContext.readConsistencyStrategy != null - && request.requestContext.readConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { - effectiveReadConsistencyStrategy = request.requestContext.readConsistencyStrategy; + if (requestContextReadConsistencyStrategy != null + && requestContextReadConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { + effectiveReadConsistencyStrategy = requestContextReadConsistencyStrategy; } if (effectiveReadConsistencyStrategy == null) { From c2df4d4db38bf1956a21a8ba89223435186b4263 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 23 Apr 2026 20:39:51 -0400 Subject: [PATCH 23/46] Add operation policy E2E tests and document RntbdReadConsistencyStrategy tests (#48094) - Gateway E2E: readConsistencyStrategy set via CosmosOperationPolicy propagates end-to-end and is reflected in CosmosDiagnostics - Gateway E2E: operation policy readConsistencyStrategy overrides request-level - RntbdReadConsistencyStrategyHeaderTests: add class-level Javadoc explaining purpose, consistency headers decision matrix, and test regions; move data providers to top; remove duplicate data provider; add region comments Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...GatewayReadConsistencyStrategyE2ETest.java | 69 ++++++++++++++++ ...tbdReadConsistencyStrategyHeaderTests.java | 82 ++++++++++++++++--- 2 files changed, 140 insertions(+), 11 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java index e62b3e99c9b9..0a7dae5b9cfb 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java @@ -11,6 +11,7 @@ import com.azure.cosmos.models.CosmosItemResponse; import com.azure.cosmos.models.CosmosQueryRequestOptions; import com.azure.cosmos.models.CosmosReadManyRequestOptions; +import com.azure.cosmos.models.CosmosRequestOptions; import com.azure.cosmos.models.FeedRange; import com.azure.cosmos.models.FeedResponse; import com.azure.cosmos.models.PartitionKey; @@ -376,6 +377,74 @@ public void gateway_requestLevelReadConsistencyStrategy_overridesClientLevelRead // endregion + // region Operation policy (dynamic request options) — readConsistencyStrategy set via CosmosOperationPolicy + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_operationPolicy_setsReadConsistencyStrategy() { + // Verifies that readConsistencyStrategy set dynamically via CosmosOperationPolicy + // (CosmosRequestOptions.setReadConsistencyStrategy) propagates end-to-end through + // the gateway pipeline and is reflected in CosmosDiagnostics. + CosmosAsyncClient policyClient = null; + try { + policyClient = createGatewayBuilder() + .addOperationPolicy(cosmosOperationDetails -> { + CosmosRequestOptions overrides = new CosmosRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + cosmosOperationDetails.setRequestOptions(overrides); + }) + .buildAsyncClient(); + CosmosAsyncContainer policyContainer = policyClient.getDatabase(databaseId).getContainer(containerId); + + String id = UUID.randomUUID().toString(); + createAndInsertDocument(policyContainer, id); + + CosmosItemResponse response = + policyContainer.readItem(id, new PartitionKey(id), ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + } finally { + safeClose(policyClient); + } + } + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_operationPolicy_readConsistencyStrategyOverridesRequestLevel() { + // Verifies that readConsistencyStrategy set via operation policy takes effect + // even when request-level options set a different readConsistencyStrategy. + // Operation policy runs AFTER request options are set, so it should win. + CosmosAsyncClient policyClient = null; + try { + policyClient = createGatewayBuilder() + .addOperationPolicy(cosmosOperationDetails -> { + CosmosRequestOptions overrides = new CosmosRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); + cosmosOperationDetails.setRequestOptions(overrides); + }) + .buildAsyncClient(); + CosmosAsyncContainer policyContainer = policyClient.getDatabase(databaseId).getContainer(containerId); + + String id = UUID.randomUUID().toString(); + createAndInsertDocument(policyContainer, id); + + // Request-level sets LATEST_COMMITTED, but the operation policy overrides to EVENTUAL + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + CosmosItemResponse response = + policyContainer.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.EVENTUAL); + } finally { + safeClose(policyClient); + } + } + + // endregion + // region Helpers private CosmosClientBuilder createGatewayBuilder() { diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java index 9ad16116b303..828744328200 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java @@ -28,8 +28,52 @@ import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +/** + * Unit tests for the ReadConsistencyStrategy RNTBD header (token ID 0x00F0, Byte type). + * + *

Why these tests exist

+ * The thin client proxy (Gateway V2) deserializes ReadConsistencyStrategy from the RNTBD binary + * frame — not from HTTP headers. A mismatch between the Java SDK's enum byte values and the + * proxy's C++ enum causes the proxy to either reject the request or apply the wrong strategy + * silently. These tests guard the contract: + *
    + *
  • Token metadata (ID = 0x00F0, type = Byte, optional)
  • + *
  • Byte encoding per strategy (Eventual=0x01, Session=0x02, LatestCommitted=0x03, GlobalStrong=0x04)
  • + *
  • HTTP header string → RNTBD byte mapping via {@code RntbdRequestHeaders.addReadConsistencyStrategy()}
  • + *
  • Full resolve → encode pipeline: {@code resolveEffectiveConsistencyHeaders} + {@code wrapInHttpRequest}
  • + *
+ * + *

Consistency headers decision matrix

+ * Users can set ConsistencyLevel (CL) and ReadConsistencyStrategy (RCS) at both client and + * request level. The SDK resolves contention before wire serialization: + *
+ * | Client CL | Client RCS | Request CL | Request RCS | Effective on wire           |
+ * |-----------|------------|------------|-------------|-----------------------------|
+ * | Session   | —          | —          | —           | CL=Session (default)        |
+ * | Session   | —          | —          | LC          | RCS=LC, CL stripped         |
+ * | Session   | Eventual   | —          | LC          | RCS=LC (req RCS > client)   |
+ * | Session   | Eventual   | Eventual   | —           | RCS=Eventual, CL stripped   |
+ * | Session   | —          | Eventual   | LC          | RCS=LC (req RCS > req CL)   |
+ * | Session   | LC         | —          | —           | RCS=LC, CL stripped         |
+ * | Session   | —          | —          | GLOBAL_STRONG| BadRequestException (non-Strong acct) |
+ * 
+ * Resolution rule: request-level RCS > client-level RCS > CL. When a non-DEFAULT RCS is + * effective, CL is stripped to prevent dual-header rejection by the compute gateway or proxy. + * + *

Test regions

+ *
    + *
  1. Token-level — RNTBD token encoding, decoding, metadata, and enum constants.
  2. + *
  3. ThinClientStoreModel encoding — {@code wrapInHttpRequest()} produces correct RNTBD + * frame bytes for each strategy value.
  4. + *
  5. Resolve + encode pipeline — {@code resolveEffectiveConsistencyHeaders()} followed by + * {@code wrapInHttpRequest()} produces the correct frame for contention scenarios (both CL + * and RCS set, request-level overrides client-level, DEFAULT is transparent).
  6. + *
+ */ public class RntbdReadConsistencyStrategyHeaderTests { + // region Data providers + @DataProvider(name = "readConsistencyStrategyToRntbdByteValues") public Object[][] readConsistencyStrategyToRntbdByteValues() { return new Object[][] { @@ -40,6 +84,20 @@ public Object[][] readConsistencyStrategyToRntbdByteValues() { }; } + @DataProvider(name = "readConsistencyStrategyStringToRntbdByteValues") + public Object[][] readConsistencyStrategyStringToRntbdByteValues() { + return new Object[][] { + { "LatestCommitted", (byte) 0x03 }, + { "Eventual", (byte) 0x01 }, + { "Session", (byte) 0x02 }, + { "GlobalStrong", (byte) 0x04 }, + }; + } + + // endregion + + // region Token-level tests — RNTBD token metadata, encoding, and constants + @Test(groups = { "unit" }, dataProvider = "readConsistencyStrategyToRntbdByteValues") public void readConsistencyStrategyTokenEncodesCorrectly( ReadConsistencyStrategy ignoredStrategy, @@ -80,6 +138,11 @@ public void readConsistencyStrategyTokenNotPresentWhenNotSet() { assertThat(token.isPresent()).isFalse(); } + // endregion + + // region Token round-trip — verifies encode/decode symmetry for the ReadConsistencyStrategy + // Byte token. Guards against RNTBD frame corruption if the token serialization format changes. + @Test(groups = { "unit" }, dataProvider = "readConsistencyStrategyToRntbdByteValues") public void readConsistencyStrategyTokenRoundTrips( ReadConsistencyStrategy ignoredStrategy, @@ -131,17 +194,8 @@ public void readConsistencyStrategyHttpHeaderConstant() { .isEqualTo("x-ms-cosmos-read-consistency-strategy"); } - // region ThinClientStoreModel RNTBD encoding via wrapInHttpRequest() - - @DataProvider(name = "readConsistencyStrategyStringToRntbdByteValues") - public Object[][] readConsistencyStrategyStringToRntbdByteValues() { - return new Object[][] { - { "LatestCommitted", (byte) 0x03 }, - { "Eventual", (byte) 0x01 }, - { "Session", (byte) 0x02 }, - { "GlobalStrong", (byte) 0x04 }, - }; - } + // region ThinClientStoreModel RNTBD encoding — verifies that wrapInHttpRequest() correctly + // maps the HTTP header string to the RNTBD byte token in the binary frame body. @Test(groups = { "unit" }, dataProvider = "readConsistencyStrategyStringToRntbdByteValues") public void thinClient_wrapInHttpRequest_readConsistencyStrategyEncodedInRntbdFrame(String readConsistencyStrategyValue, byte expectedByte) throws Exception { @@ -215,6 +269,12 @@ public void thinClient_wrapInHttpRequest_readConsistencyStrategyPresent_clAbsent } } + // endregion + + // region Resolve + encode pipeline — verifies resolveEffectiveConsistencyHeaders() followed by + // wrapInHttpRequest() produces the correct RNTBD frame for contention scenarios where both + // ConsistencyLevel and ReadConsistencyStrategy headers are present. + @Test(groups = { "unit" }) public void thinClient_resolveAndWrap_bothClAndReadConsistencyStrategy_onlyReadConsistencyStrategySurvivesInFrame() throws Exception { // End-to-end chain: dirty headers (both CL and readConsistencyStrategy set) From 8a5b47726af5560754f1a2e89c7fb55242338c0d Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 23 Apr 2026 20:48:18 -0400 Subject: [PATCH 24/46] Add thin client operation policy E2E tests for readConsistencyStrategy (#48094) - Thin client E2E: readConsistencyStrategy set via CosmosOperationPolicy propagates through RNTBD proxy and is reflected in CosmosDiagnostics - Thin client E2E: operation policy readConsistencyStrategy overrides request-level readConsistencyStrategy Mirrors the Gateway V1 operation policy tests for coverage parity. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...nClientReadConsistencyStrategyE2ETest.java | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java index 4252ff5821fc..0b46e9754db0 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java @@ -19,6 +19,7 @@ import com.azure.cosmos.models.CosmosItemResponse; import com.azure.cosmos.models.CosmosQueryRequestOptions; import com.azure.cosmos.models.CosmosReadManyRequestOptions; +import com.azure.cosmos.models.CosmosRequestOptions; import com.azure.cosmos.models.FeedRange; import com.azure.cosmos.models.FeedResponse; import com.azure.cosmos.models.PartitionKey; @@ -421,6 +422,69 @@ public void thinClient_globalStrong_onSessionAccount_throwsBadRequest() { // endregion + // region Operation policy (dynamic request options) — readConsistencyStrategy set via CosmosOperationPolicy + + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_operationPolicy_setsReadConsistencyStrategy() { + CosmosAsyncClient policyClient = null; + try { + policyClient = createThinClientBuilder() + .addOperationPolicy(cosmosOperationDetails -> { + CosmosRequestOptions overrides = new CosmosRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + cosmosOperationDetails.setRequestOptions(overrides); + }) + .buildAsyncClient(); + CosmosAsyncContainer policyContainer = policyClient.getDatabase(databaseId).getContainer(containerId); + + String id = UUID.randomUUID().toString(); + createAndInsertDocument(policyContainer, id); + + CosmosItemResponse response = + policyContainer.readItem(id, new PartitionKey(id), ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertThinClientEndpointUsed(response.getDiagnostics()); + } finally { + safeClose(policyClient); + } + } + + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_operationPolicy_readConsistencyStrategyOverridesRequestLevel() { + CosmosAsyncClient policyClient = null; + try { + policyClient = createThinClientBuilder() + .addOperationPolicy(cosmosOperationDetails -> { + CosmosRequestOptions overrides = new CosmosRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); + cosmosOperationDetails.setRequestOptions(overrides); + }) + .buildAsyncClient(); + CosmosAsyncContainer policyContainer = policyClient.getDatabase(databaseId).getContainer(containerId); + + String id = UUID.randomUUID().toString(); + createAndInsertDocument(policyContainer, id); + + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + CosmosItemResponse response = + policyContainer.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.EVENTUAL); + assertThinClientEndpointUsed(response.getDiagnostics()); + } finally { + safeClose(policyClient); + } + } + + // endregion + // region Helpers private CosmosClientBuilder createThinClientBuilder() { From 2ecdbd842e66d8906ae85c5c72c9c277a11bbbc3 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 23 Apr 2026 21:02:23 -0400 Subject: [PATCH 25/46] Fix RxGatewayStoreModelTest mock verification for retry behavior (#48094) ConnectTimeoutException triggers retries, so httpClient.send() is called multiple times. Use atLeastOnce() and capture the last request. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../cosmos/implementation/RxGatewayStoreModelTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java index 356abb777fa0..cfacc982c65a 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java @@ -28,6 +28,7 @@ import java.net.SocketException; import java.net.URI; import java.time.Duration; +import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import static com.azure.cosmos.implementation.TestUtils.mockDiagnosticsClientContext; @@ -360,8 +361,10 @@ public void readConsistencyStrategyHeader_preservedOnWire_consistencyLevelStripp // expected — mock returns error } - Mockito.verify(httpClient).send(httpClientRequestCaptor.capture(), any()); - HttpRequest capturedRequest = httpClientRequestCaptor.getValue(); + Mockito.verify(httpClient, Mockito.atLeastOnce()).send(httpClientRequestCaptor.capture(), any()); + // Retries may fire multiple requests — take the last captured one + List allRequests = httpClientRequestCaptor.getAllValues(); + HttpRequest capturedRequest = allRequests.get(allRequests.size() - 1); HttpHeaders capturedHeaders = ReflectionUtils.getHttpHeaders(capturedRequest); assertThat(capturedHeaders.toMap().get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) From 9bbbcb9f76a0e004ded7f86f790601b9c5ba96bf Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 23 Apr 2026 21:18:59 -0400 Subject: [PATCH 26/46] Use Gateway V1/V2 terminology in customer-facing docs (#48094) Update CHANGELOG and ReadConsistencyStrategy Javadoc to say "Direct, Gateway V1, and Gateway V2" instead of "all connection modes". Clarify that Gateway V1 uses HTTP headers and Gateway V2 uses RNTBD headers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- sdk/cosmos/azure-cosmos/CHANGELOG.md | 2 +- .../main/java/com/azure/cosmos/ReadConsistencyStrategy.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/cosmos/azure-cosmos/CHANGELOG.md b/sdk/cosmos/azure-cosmos/CHANGELOG.md index ead4af259f25..d7f4fcdb5182 100644 --- a/sdk/cosmos/azure-cosmos/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos/CHANGELOG.md @@ -4,7 +4,7 @@ #### Features Added * Added support for change feed with `startFrom` point-in-time on merged partitions by enabling the `CHANGE_FEED_WITH_START_TIME_POST_MERGE` SDK capability. - See [PR 48752](https://github.com/Azure/azure-sdk-for-java/pull/48752) -* Added RNTBD header encoding for `ReadConsistencyStrategy` to enable thin client (Gateway V2) and compute gateway (Gateway V1) propagation. `ReadConsistencyStrategy` is now supported in all connection modes (direct, gateway, thin client). Also added client-side validation for `GLOBAL_STRONG` on non-Strong consistency accounts. - See [PR 48787](https://github.com/Azure/azure-sdk-for-java/pull/48787) +* Added RNTBD header encoding for `ReadConsistencyStrategy` to enable Gateway V2 (thin client) propagation and HTTP header propagation for Gateway V1 (compute gateway). `ReadConsistencyStrategy` is now supported in Direct mode, Gateway V1, and Gateway V2. Also added client-side validation for `GLOBAL_STRONG` on non-Strong consistency accounts. - See [PR 48787](https://github.com/Azure/azure-sdk-for-java/pull/48787) #### Breaking Changes diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java index 81c0a4828490..2bcc4d59663b 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java @@ -22,8 +22,8 @@ * in RequestOptions, CosmosClient or the default consistency level for an account unless * ReadConsistencyStrategy `DEFAULT` is used. *

- * NOTE: The ReadConsistencyStrategy is supported in direct mode, thin client (Gateway V2) mode, - * and gateway mode + * NOTE: The ReadConsistencyStrategy is supported in Direct mode, Gateway V1 (compute gateway, + * HTTP header), and Gateway V2 (thin client proxy, RNTBD header). */ @Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING) public enum ReadConsistencyStrategy { From f078479f89fa2f83cc46cec9a5ccea06e813d202 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 23 Apr 2026 21:20:33 -0400 Subject: [PATCH 27/46] Fix CHANGELOG/Javadoc: Direct mode was already supported before this PR (#48094) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- sdk/cosmos/azure-cosmos/CHANGELOG.md | 2 +- .../main/java/com/azure/cosmos/ReadConsistencyStrategy.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/cosmos/azure-cosmos/CHANGELOG.md b/sdk/cosmos/azure-cosmos/CHANGELOG.md index d7f4fcdb5182..19d2c339f417 100644 --- a/sdk/cosmos/azure-cosmos/CHANGELOG.md +++ b/sdk/cosmos/azure-cosmos/CHANGELOG.md @@ -4,7 +4,7 @@ #### Features Added * Added support for change feed with `startFrom` point-in-time on merged partitions by enabling the `CHANGE_FEED_WITH_START_TIME_POST_MERGE` SDK capability. - See [PR 48752](https://github.com/Azure/azure-sdk-for-java/pull/48752) -* Added RNTBD header encoding for `ReadConsistencyStrategy` to enable Gateway V2 (thin client) propagation and HTTP header propagation for Gateway V1 (compute gateway). `ReadConsistencyStrategy` is now supported in Direct mode, Gateway V1, and Gateway V2. Also added client-side validation for `GLOBAL_STRONG` on non-Strong consistency accounts. - See [PR 48787](https://github.com/Azure/azure-sdk-for-java/pull/48787) +* Enabled `ReadConsistencyStrategy` for Gateway V1 (compute gateway, HTTP header) and Gateway V2 (thin client proxy, RNTBD header). Previously only supported in Direct mode. Also added client-side validation for `GLOBAL_STRONG` on non-Strong consistency accounts. - See [PR 48787](https://github.com/Azure/azure-sdk-for-java/pull/48787) #### Breaking Changes diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java index 2bcc4d59663b..d1cafdb6bca1 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java @@ -22,8 +22,8 @@ * in RequestOptions, CosmosClient or the default consistency level for an account unless * ReadConsistencyStrategy `DEFAULT` is used. *

- * NOTE: The ReadConsistencyStrategy is supported in Direct mode, Gateway V1 (compute gateway, - * HTTP header), and Gateway V2 (thin client proxy, RNTBD header). + * NOTE: The ReadConsistencyStrategy is supported in Direct mode (existing), Gateway V1 (compute + * gateway, HTTP header), and Gateway V2 (thin client proxy, RNTBD header). */ @Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING) public enum ReadConsistencyStrategy { From 83fc11516807b37717963e2770fdbafbbba0d76b Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 23 Apr 2026 21:32:38 -0400 Subject: [PATCH 28/46] Add readAllItems E2E tests for readConsistencyStrategy on Gateway V1 and V2 (#48094) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...GatewayReadConsistencyStrategyE2ETest.java | 22 ++++++++++++++++++ ...nClientReadConsistencyStrategyE2ETest.java | 23 +++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java index 0a7dae5b9cfb..0f5dad1b2097 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java @@ -167,6 +167,28 @@ public void gateway_queryItems_withLatestCommitted() { // endregion + // region ReadAllItems (uses CosmosQueryRequestOptions) + + @Test(groups = {"fast"}, timeOut = TIMEOUT) + public void gateway_readAllItems_withLatestCommitted() { + String pk = UUID.randomUUID().toString(); + createAndInsertDocument(UUID.randomUUID().toString(), pk); + + CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + FeedResponse response = container + .readAllItems(new PartitionKey(pk), queryOptions, ObjectNode.class) + .byPage() + .blockFirst(); + + assertThat(response).isNotNull(); + assertThat(response.getResults()).isNotNull(); + assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + } + + // endregion + // region ChangeFeedRequestOptions @Test(groups = {"fast"}, timeOut = TIMEOUT) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java index 0b46e9754db0..74670d6e7f19 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java @@ -178,6 +178,29 @@ public void thinClient_queryItems_withLatestCommitted() { // endregion + // region ReadAllItems (uses CosmosQueryRequestOptions) + + @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void thinClient_readAllItems_withLatestCommitted() { + String pk = UUID.randomUUID().toString(); + createAndInsertDocument(UUID.randomUUID().toString(), pk); + + CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + FeedResponse response = container + .readAllItems(new PartitionKey(pk), queryOptions, ObjectNode.class) + .byPage() + .blockFirst(); + + assertThat(response).isNotNull(); + assertThat(response.getResults()).isNotNull(); + assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); + assertThinClientEndpointUsed(response.getCosmosDiagnostics()); + } + + // endregion + // region ChangeFeedRequestOptions @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) From ff18029ebf6dab9ed2ff031b48f556ae35bb8eed Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Thu, 23 Apr 2026 22:30:45 -0400 Subject: [PATCH 29/46] Replace HashMap copy in applySessionToken with pure isEffectiveSessionConsistency (#48094) applySessionToken only needs to know if the effective consistency is Session. The previous approach called RequestHelper.getReadConsistencyStrategyToUse() which mutates x-ms-consistency-level (a Direct-mode telemetry concern), requiring a defensive HashMap copy on every non-master request. New approach: a pure-read isEffectiveSessionConsistency() that checks requestContext.readConsistencyStrategy > header readConsistencyStrategy > header consistencyLevel > account default, with no side-effects and no copy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../implementation/RxGatewayStoreModel.java | 47 +++++++++++++++---- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java index ea2c8f0010cc..cd6b9712cc12 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java @@ -12,7 +12,6 @@ import com.azure.cosmos.implementation.caches.RxPartitionKeyRangeCache; import com.azure.cosmos.implementation.directconnectivity.GatewayServiceConfigurationReader; import com.azure.cosmos.implementation.directconnectivity.HttpUtils; -import com.azure.cosmos.implementation.directconnectivity.RequestHelper; import com.azure.cosmos.implementation.directconnectivity.StoreResponse; import com.azure.cosmos.implementation.directconnectivity.Uri; import com.azure.cosmos.implementation.directconnectivity.WebExceptionUtility; @@ -1034,6 +1033,38 @@ private Mono resolvePartitionKeyRangeByPkRangeIdCore( }); } + /** + * Determines if the effective consistency for this request is Session — needed by + * {@link #applySessionToken} to decide whether to attach/remove session tokens. + * + * Pure read — no side-effects, no header mutation, no HashMap copy. + * Resolution order: request-level readConsistencyStrategy > client-level readConsistencyStrategy + * (header) > consistency-level header > account default. + */ + private boolean isEffectiveSessionConsistency(RxDocumentServiceRequest request) { + // Request-level readConsistencyStrategy takes priority + if (request.requestContext != null + && request.requestContext.readConsistencyStrategy != null + && request.requestContext.readConsistencyStrategy != ReadConsistencyStrategy.DEFAULT) { + return request.requestContext.readConsistencyStrategy == ReadConsistencyStrategy.SESSION; + } + + // Client-level readConsistencyStrategy from header + String rcsHeader = request.getHeaders().get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY); + if (!Strings.isNullOrEmpty(rcsHeader)) { + return ReadConsistencyStrategy.SESSION.toString().equals(rcsHeader); + } + + // Explicit consistency level header + String clHeader = request.getHeaders().get(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); + if (!Strings.isNullOrEmpty(clHeader)) { + return ConsistencyLevel.SESSION.toString().equalsIgnoreCase(clHeader); + } + + // Fall back to account default + return this.gatewayServiceConfigurationReader.getDefaultConsistencyLevel() == ConsistencyLevel.SESSION; + } + private Mono applySessionToken(RxDocumentServiceRequest request) { Map headers = request.getHeaders(); Objects.requireNonNull(headers, "RxDocumentServiceRequest::headers is required and cannot be null"); @@ -1046,15 +1077,11 @@ private Mono applySessionToken(RxDocumentServiceRequest request) { return Mono.empty(); } - // Use a copy of the headers to prevent the side-effect of - // RequestHelper.getReadConsistencyStrategyToUse() rewriting x-ms-consistency-level. - // In gateway mode, x-ms-consistency-level must stay as the original account/client level — - // only x-ms-cosmos-read-consistency-strategy carries the readConsistencyStrategy intent to the gateway/proxy. - boolean sessionConsistency = (RequestHelper.getReadConsistencyStrategyToUse( - new HashMap<>(request.getHeaders()), - request.requestContext != null ? request.requestContext.readConsistencyStrategy : null, - this.gatewayServiceConfigurationReader.getDefaultConsistencyLevel()) - == ReadConsistencyStrategy.SESSION); + // Determine if the effective consistency is Session — needed to decide whether to + // attach/remove session tokens. This is a pure read with no side-effects; it does NOT + // call RequestHelper.getReadConsistencyStrategyToUse() which mutates x-ms-consistency-level + // (a Direct-mode telemetry concern that is harmful in Gateway mode). + boolean sessionConsistency = isEffectiveSessionConsistency(request); if (!Strings.isNullOrEmpty(request.getHeaders().get(HttpConstants.HttpHeaders.SESSION_TOKEN))) { if (!sessionConsistency || From 8454f70b372fc3ad1849a0d02f561a27342bda2a Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Mon, 27 Apr 2026 14:14:07 -0400 Subject: [PATCH 30/46] Refactoring --- .../ConsistencyFlagContentionTest.java | 172 ------------------ ...tbdReadConsistencyStrategyHeaderTests.java | 71 +++++--- 2 files changed, 45 insertions(+), 198 deletions(-) delete mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java deleted file mode 100644 index cecd26c25c46..000000000000 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ConsistencyFlagContentionTest.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.cosmos.implementation; - -import com.azure.cosmos.ConsistencyLevel; -import com.azure.cosmos.ReadConsistencyStrategy; -import org.testng.annotations.Test; - -import java.util.HashMap; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * Unit tests for consistency flag contention resolution in RxGatewayStoreModel. - * - * Contention rules: - * 1. Request-level readConsistencyStrategy (requestContext) > client-level readConsistencyStrategy (header) - * 2. readConsistencyStrategy > ConsistencyLevel — strip CL when non-DEFAULT readConsistencyStrategy is effective - * 3. DEFAULT readConsistencyStrategy is transparent — CL stays - */ -public class ConsistencyFlagContentionTest { - - // region getRequestHeaders — Option A guard - - @Test(groups = "unit") - public void getRequestHeaders_bothReadConsistencyStrategyAndCl_onlyReadConsistencyStrategySurvives() { - // Simulates the contention: request options set both readConsistencyStrategy and CL. - // After getRequestHeaders, readConsistencyStrategy should be present and CL should be absent. - Map headers = new HashMap<>(); - headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, - ReadConsistencyStrategy.LATEST_COMMITTED.toString()); - // Simulate the Option A guard: CL should NOT be added when readConsistencyStrategy is present - if (!headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) { - headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.EVENTUAL.toString()); - } - - assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)).isTrue(); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); - } - - @Test(groups = "unit") - public void getRequestHeaders_onlyCl_clSurvives() { - // When no readConsistencyStrategy is set, CL should be set normally. - Map headers = new HashMap<>(); - if (!headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) { - headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.SESSION.toString()); - } - - assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isTrue(); - assertThat(headers.get(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isEqualTo("Session"); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)).isFalse(); - } - - @Test(groups = "unit") - public void getRequestHeaders_onlyReadConsistencyStrategy_readConsistencyStrategySurvives() { - // When only readConsistencyStrategy is set (no CL), readConsistencyStrategy should survive. - Map headers = new HashMap<>(); - headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, - ReadConsistencyStrategy.EVENTUAL.toString()); - - assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)).isTrue(); - assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)).isEqualTo("Eventual"); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); - } - - // endregion - - // region resolveEffectiveConsistencyHeaders — centralized resolution - - @Test(groups = "unit") - public void resolve_requestContextReadConsistencyStrategy_stripsCl() { - // When requestContext has non-DEFAULT readConsistencyStrategy and headers have CL, CL should be stripped. - Map headers = new HashMap<>(); - headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.SESSION.toString()); - - DocumentServiceRequestContext ctx = new DocumentServiceRequestContext(); - ctx.readConsistencyStrategy = ReadConsistencyStrategy.LATEST_COMMITTED; - - RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, ctx.readConsistencyStrategy); - - assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); - assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .isEqualTo("LatestCommitted"); - } - - @Test(groups = "unit") - public void resolve_headerReadConsistencyStrategy_stripsCl() { - // When header has non-DEFAULT readConsistencyStrategy and also CL, CL should be stripped. - Map headers = new HashMap<>(); - headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.SESSION.toString()); - headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, - ReadConsistencyStrategy.EVENTUAL.toString()); - - RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); - - assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); - assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .isEqualTo("Eventual"); - } - - @Test(groups = "unit") - public void resolve_requestContextReadConsistencyStrategy_overridesHeaderReadConsistencyStrategy() { - // Request-level readConsistencyStrategy (requestContext) takes priority over header-level (client-level) readConsistencyStrategy. - Map headers = new HashMap<>(); - headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, - ReadConsistencyStrategy.EVENTUAL.toString()); - headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.EVENTUAL.toString()); - - RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, ReadConsistencyStrategy.SESSION); - - assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); - assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .isEqualTo("Session"); - } - - @Test(groups = "unit") - public void resolve_defaultReadConsistencyStrategy_clSurvives() { - // DEFAULT readConsistencyStrategy is transparent — CL should remain. - Map headers = new HashMap<>(); - headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.BOUNDED_STALENESS.toString()); - - RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, ReadConsistencyStrategy.DEFAULT); - - assertThat(headers.get(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) - .isEqualTo("BoundedStaleness"); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)).isFalse(); - } - - @Test(groups = "unit") - public void resolve_nullReadConsistencyStrategy_clSurvives() { - // When no readConsistencyStrategy is set at all, CL should remain. - Map headers = new HashMap<>(); - headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.STRONG.toString()); - - RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); - - assertThat(headers.get(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) - .isEqualTo("Strong"); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)).isFalse(); - } - - @Test(groups = "unit") - public void resolve_noHeaders_noOp() { - // When neither CL nor readConsistencyStrategy is set, resolution is a no-op. - Map headers = new HashMap<>(); - - RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); - - assertThat(headers).isEmpty(); - } - - @Test(groups = "unit") - public void resolve_idempotent_multipleInvocations() { - // Resolution should be idempotent — multiple calls produce the same result. - // This validates safety for shared header maps across availability strategy clones. - Map headers = new HashMap<>(); - headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, ConsistencyLevel.SESSION.toString()); - headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, - ReadConsistencyStrategy.LATEST_COMMITTED.toString()); - - RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); - RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); - RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); - - assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); - assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .isEqualTo("LatestCommitted"); - } - - // endregion -} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java index 828744328200..b1782be3e333 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java @@ -98,6 +98,16 @@ public Object[][] readConsistencyStrategyStringToRntbdByteValues() { // region Token-level tests — RNTBD token metadata, encoding, and constants + @Test(groups = { "unit" }) + public void readConsistencyStrategyTokenMetadata() { + assertThat(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy.id()) + .isEqualTo((short) 0x00F0); + assertThat(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy.type()) + .isEqualTo(RntbdTokenType.Byte); + assertThat(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy.isRequired()) + .isFalse(); + } + @Test(groups = { "unit" }, dataProvider = "readConsistencyStrategyToRntbdByteValues") public void readConsistencyStrategyTokenEncodesCorrectly( ReadConsistencyStrategy ignoredStrategy, @@ -113,24 +123,6 @@ public void readConsistencyStrategyTokenEncodesCorrectly( assertThat(((Number) token.getValue()).byteValue()).isEqualTo(expectedByteValue); } - @Test(groups = { "unit" }) - public void readConsistencyStrategyHeaderId() { - assertThat(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy.id()) - .isEqualTo((short) 0x00F0); - } - - @Test(groups = { "unit" }) - public void readConsistencyStrategyHeaderType() { - assertThat(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy.type()) - .isEqualTo(RntbdTokenType.Byte); - } - - @Test(groups = { "unit" }) - public void readConsistencyStrategyHeaderNotRequired() { - assertThat(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy.isRequired()) - .isFalse(); - } - @Test(groups = { "unit" }) public void readConsistencyStrategyTokenNotPresentWhenNotSet() { RntbdToken token = RntbdToken.create( @@ -194,8 +186,8 @@ public void readConsistencyStrategyHttpHeaderConstant() { .isEqualTo("x-ms-cosmos-read-consistency-strategy"); } - // region ThinClientStoreModel RNTBD encoding — verifies that wrapInHttpRequest() correctly - // maps the HTTP header string to the RNTBD byte token in the binary frame body. + // region No contention — single header encoding. Only one of CL or RCS is set (or neither). + // No resolution needed; tests pure RNTBD encoder correctness. @Test(groups = { "unit" }, dataProvider = "readConsistencyStrategyStringToRntbdByteValues") public void thinClient_wrapInHttpRequest_readConsistencyStrategyEncodedInRntbdFrame(String readConsistencyStrategyValue, byte expectedByte) throws Exception { @@ -271,9 +263,8 @@ public void thinClient_wrapInHttpRequest_readConsistencyStrategyPresent_clAbsent // endregion - // region Resolve + encode pipeline — verifies resolveEffectiveConsistencyHeaders() followed by - // wrapInHttpRequest() produces the correct RNTBD frame for contention scenarios where both - // ConsistencyLevel and ReadConsistencyStrategy headers are present. + // region Contention — both CL and RCS headers present. Tests resolveEffectiveConsistencyHeaders() + // followed by wrapInHttpRequest() to verify the correct header wins on the wire. @Test(groups = { "unit" }) public void thinClient_resolveAndWrap_bothClAndReadConsistencyStrategy_onlyReadConsistencyStrategySurvivesInFrame() throws Exception { @@ -312,13 +303,17 @@ public void thinClient_resolveAndWrap_bothClAndReadConsistencyStrategy_onlyReadC @Test(groups = { "unit" }) public void thinClient_resolveAndWrap_requestContextReadConsistencyStrategy_overridesHeaderReadConsistencyStrategy() throws Exception { - // Request-level readConsistencyStrategy (requestContext) takes priority over header-level (client-level) readConsistencyStrategy + // Header-level RCS ("Eventual") = set by CosmosClientBuilder.readConsistencyStrategy(), + // applied to every request via getRequestHeaders(). + // Request-level RCS (LATEST_COMMITTED) = set by CosmosItemRequestOptions.setReadConsistencyStrategy(), + // a per-operation override stored in requestContext. + // Resolution rule: requestContext (per-request) > headers (client-level). ThinClientStoreModel storeModel = createMockThinClientStoreModel(); RxDocumentServiceRequest request = createDocumentReadRequest(); - request.getHeaders().put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, "Eventual"); + request.getHeaders().put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, "Eventual"); // client-level request.getHeaders().put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, "Session"); - request.requestContext.readConsistencyStrategy = ReadConsistencyStrategy.LATEST_COMMITTED; + request.requestContext.readConsistencyStrategy = ReadConsistencyStrategy.LATEST_COMMITTED; // per-request override resolveEffectiveConsistencyHeaders(request); @@ -370,6 +365,30 @@ public void thinClient_resolveAndWrap_defaultReadConsistencyStrategy_clSurvives( } } + @Test(groups = { "unit" }) + public void resolve_noHeaders_noOp() { + Map headers = new java.util.HashMap<>(); + RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); + assertThat(headers.size()).isEqualTo(0); + } + + @Test(groups = { "unit" }) + public void resolve_idempotent_multipleInvocations() { + // Resolution should be idempotent — multiple calls produce the same result. + // Validates safety for shared header maps across availability strategy clones. + Map headers = new java.util.HashMap<>(); + headers.put(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, "Session"); + headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, "LatestCommitted"); + + RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); + RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); + RxGatewayStoreModel.resolveEffectiveConsistencyHeaders(headers, null); + + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)).isFalse(); + assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .isEqualTo("LatestCommitted"); + } + // endregion // region Helpers From d6ba570744323afbc6440fcb460d31835b1afd2b Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Mon, 27 Apr 2026 17:01:44 -0400 Subject: [PATCH 31/46] Consolidate ReadConsistencyStrategy test coverage into unified spy wire test - Combine RntbdReadConsistencyStrategyHeaderTests metadata tests (headerId, headerType, headerNotRequired) into single readConsistencyStrategyTokenMetadata test - Rename test regions to no-contention vs contention for clarity - Add client-level vs request-level RCS comment explaining resolution precedence - Merge idempotency and no-op tests from deleted ConsistencyFlagContentionTest - Delete ConsistencyFlagContentionTest (redundant with RntbdHeaderTests) - Delete ReadConsistencyStrategyHttpSpyWireTest (replaced by unified test) - Remove RCS test from RxGatewayStoreModelTest (covered by unified test) - Create ReadConsistencyStrategySpyWireTest: unified spy wire test covering both Gateway V1 (HTTP headers) and Gateway V2 (RNTBD frame via RntbdRequest.decode) - V2 tests use proper RNTBD frame parsing instead of brute-force byte scanning - V2 routing assertion validates thin client proxy endpoint (:10250) - Use TestConfigurations instead of inline System.getProperty/getenv - Use lazy accessor pattern for ImplementationBridgeHelpers - Use TestSuiteBase.createCollection for serverless-safe container creation - Remove unnecessary CosmosItemSerializer.DEFAULT_SERIALIZER - Use thinclient test group consistent with existing E2E tests - Eliminate all abbreviations (RCS, CL, isV2) in favor of full names Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...eadConsistencyStrategyHttpSpyWireTest.java | 402 -------------- .../ReadConsistencyStrategySpyWireTest.java | 500 ++++++++++++++++++ .../RxGatewayStoreModelTest.java | 76 --- ...tbdReadConsistencyStrategyHeaderTests.java | 44 +- 4 files changed, 522 insertions(+), 500 deletions(-) delete mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java create mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategySpyWireTest.java diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java deleted file mode 100644 index ede359fe8050..000000000000 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategyHttpSpyWireTest.java +++ /dev/null @@ -1,402 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.cosmos.implementation; - -import com.azure.cosmos.ConsistencyLevel; -import com.azure.cosmos.CosmosAsyncClient; -import com.azure.cosmos.CosmosAsyncContainer; -import com.azure.cosmos.CosmosAsyncDatabase; -import com.azure.cosmos.CosmosClientBuilder; -import com.azure.cosmos.CosmosItemSerializer; -import com.azure.cosmos.GatewayConnectionConfig; -import com.azure.cosmos.ReadConsistencyStrategy; -import com.azure.cosmos.implementation.http.HttpRequest; -import com.azure.cosmos.models.CosmosClientTelemetryConfig; -import com.azure.cosmos.models.CosmosContainerProperties; -import com.azure.cosmos.models.CosmosItemRequestOptions; -import com.azure.cosmos.models.PartitionKey; -import com.fasterxml.jackson.databind.node.ObjectNode; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -import java.net.URI; -import java.net.URISyntaxException; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import static org.assertj.core.api.Assertions.assertThat; - -/** - * Standalone HTTP spy-wire tests for ReadConsistencyStrategy header propagation. - * Does NOT extend TestSuiteBase — creates its own serverless-safe resources (no throughput). - */ -public class ReadConsistencyStrategyHttpSpyWireTest { - private static final Logger logger = LoggerFactory.getLogger(ReadConsistencyStrategyHttpSpyWireTest.class); - - private static final ImplementationBridgeHelpers.CosmosItemRequestOptionsHelper.CosmosItemRequestOptionsAccessor - itemOptionsAccessor = ImplementationBridgeHelpers.CosmosItemRequestOptionsHelper.getCosmosItemRequestOptionsAccessor(); - - private static final long TIMEOUT = 60_000L; - private static final String DOCUMENT_ID = UUID.randomUUID().toString(); - - private CosmosAsyncClient cosmosClient; - private CosmosAsyncDatabase database; - private CosmosAsyncContainer container; - private String databaseId; - private String containerId; - - private SpyClientUnderTestFactory.ClientUnderTest spyClient; - - @BeforeClass(groups = {"fast"}, timeOut = TIMEOUT) - public void beforeClass() { - String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); - String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); - - // Create a high-level client for resource setup (no throughput = serverless-safe) - cosmosClient = new CosmosClientBuilder() - .endpoint(endpoint) - .key(key) - .gatewayMode() - .buildAsyncClient(); - - databaseId = "readConsistencyStrategy-spy-" + UUID.randomUUID().toString().substring(0, 8); - containerId = "testcontainer"; - - cosmosClient.createDatabaseIfNotExists(databaseId).block(); - database = cosmosClient.getDatabase(databaseId); - - CosmosContainerProperties props = new CosmosContainerProperties(containerId, "/mypk"); - database.createContainerIfNotExists(props).block(); - container = database.getContainer(containerId); - - // Seed a document - ObjectNode doc = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); - doc.put("id", DOCUMENT_ID); - doc.put("mypk", DOCUMENT_ID); - container.createItem(doc).block(); - - // Build the spy client (low-level AsyncDocumentClient with HTTP interceptor) - ConnectionPolicy gwPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); - - try { - spyClient = SpyClientUnderTestFactory.createClientUnderTest( - new URI(endpoint), - key, - gwPolicy, - ConsistencyLevel.SESSION, - null, // readConsistencyStrategy (none at client level for most tests) - new Configs(), - null, // credential - true, // contentResponseOnWriteEnabled - new CosmosClientTelemetryConfig() // clientTelemetryConfig - ); - } catch (URISyntaxException e) { - throw new RuntimeException(e); - } - - logger.info("Created spy-wire test resources: db={}, container={}", databaseId, containerId); - } - - @AfterClass(groups = {"fast"}, alwaysRun = true) - public void afterClass() { - if (database != null) { - try { - database.delete().block(); - logger.info("Deleted test database {}", databaseId); - } catch (Exception e) { - logger.warn("Failed to delete test database", e); - } - } - if (cosmosClient != null) { - cosmosClient.close(); - } - if (spyClient != null) { - spyClient.close(); - } - } - - private String getDocumentLink() { - return "dbs/" + databaseId + "/colls/" + containerId + "/docs/" + DOCUMENT_ID; - } - - private String getCollectionLink() { - return "dbs/" + databaseId + "/colls/" + containerId; - } - - // region ReadConsistencyStrategy — verify HTTP headers on the wire - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void readItem_withRequestLevelReadConsistencyStrategy_headerOnWire() { - CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); - cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); - - spyClient.clearCapturedRequests(); - RequestOptions requestOptions = itemOptionsAccessor.toRequestOptions(cosmosItemRequestOptions); - requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); - spyClient.readDocument(getDocumentLink(), requestOptions).block(); - - List requests = spyClient.getCapturedRequests(); - assertThat(requests).isNotEmpty(); - - HttpRequest docRequest = findDocumentRequest(requests, getDocumentLink()); - assertThat(docRequest).as("Expected a document read request").isNotNull(); - - Map headers = docRequest.headers().toMap(); - assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .isEqualTo("LatestCommitted"); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) - .as("ConsistencyLevel header should be stripped when readConsistencyStrategy is set") - .isFalse(); - } - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void readItem_withClientLevelReadConsistencyStrategy_headerOnWire() { - String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); - String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); - - ConnectionPolicy gwPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); - - SpyClientUnderTestFactory.ClientUnderTest readConsistencyStrategyClient; - try { - readConsistencyStrategyClient = SpyClientUnderTestFactory.createClientUnderTest( - new URI(endpoint), - key, - gwPolicy, - ConsistencyLevel.SESSION, - ReadConsistencyStrategy.LATEST_COMMITTED, - new Configs(), - null, true, new CosmosClientTelemetryConfig()); - } catch (URISyntaxException e) { - throw new RuntimeException(e); - } - - try { - readConsistencyStrategyClient.clearCapturedRequests(); - RequestOptions requestOptions = new RequestOptions(); - requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); - readConsistencyStrategyClient.readDocument(getDocumentLink(), requestOptions).block(); - - List requests = readConsistencyStrategyClient.getCapturedRequests(); - assertThat(requests).isNotEmpty(); - - HttpRequest docRequest = findDocumentRequest(requests, getDocumentLink()); - assertThat(docRequest).as("Expected a document read request").isNotNull(); - - Map headers = docRequest.headers().toMap(); - assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .isEqualTo("LatestCommitted"); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) - .as("ConsistencyLevel header should be stripped when client-level readConsistencyStrategy is set") - .isFalse(); - } finally { - readConsistencyStrategyClient.close(); - } - } - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void readItem_withBothReadConsistencyStrategyAndCl_onlyReadConsistencyStrategyOnWire(){ - CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); - cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - cosmosItemRequestOptions.setConsistencyLevel(ConsistencyLevel.EVENTUAL); - cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); - - spyClient.clearCapturedRequests(); - RequestOptions requestOptions = itemOptionsAccessor.toRequestOptions(cosmosItemRequestOptions); - requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); - spyClient.readDocument(getDocumentLink(), requestOptions).block(); - - List requests = spyClient.getCapturedRequests(); - assertThat(requests).isNotEmpty(); - - HttpRequest docRequest = findDocumentRequest(requests, getDocumentLink()); - assertThat(docRequest).as("Expected a document read request").isNotNull(); - - Map headers = docRequest.headers().toMap(); - assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .isEqualTo("LatestCommitted"); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) - .as("ConsistencyLevel header should be stripped when both CL and readConsistencyStrategy are set — readConsistencyStrategy wins") - .isFalse(); - } - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void readItem_withDefaultReadConsistencyStrategy_noReadConsistencyStrategyHeaderOnWire() { - CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); - cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.DEFAULT); - cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); - - spyClient.clearCapturedRequests(); - RequestOptions requestOptions = itemOptionsAccessor.toRequestOptions(cosmosItemRequestOptions); - requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); - spyClient.readDocument(getDocumentLink(), requestOptions).block(); - - List requests = spyClient.getCapturedRequests(); - assertThat(requests).isNotEmpty(); - - HttpRequest docRequest = findDocumentRequest(requests, getDocumentLink()); - assertThat(docRequest).as("Expected a document read request").isNotNull(); - - Map headers = docRequest.headers().toMap(); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .as("DEFAULT readConsistencyStrategy should not emit a header — it is transparent") - .isFalse(); - } - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void writeItem_withClientLevelReadConsistencyStrategy_noReadConsistencyStrategyHeaderOnWire() { - String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); - String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); - - ConnectionPolicy gwPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); - - SpyClientUnderTestFactory.ClientUnderTest readConsistencyStrategyClient; - try { - readConsistencyStrategyClient = SpyClientUnderTestFactory.createClientUnderTest( - new URI(endpoint), - key, - gwPolicy, - ConsistencyLevel.SESSION, - ReadConsistencyStrategy.LATEST_COMMITTED, - new Configs(), - null, true, new CosmosClientTelemetryConfig()); - } catch (URISyntaxException e) { - throw new RuntimeException(e); - } - - try { - String writeDocId = UUID.randomUUID().toString(); - Document writeDoc = new Document(String.format( - "{ \"id\": \"%s\", \"mypk\": \"%s\" }", writeDocId, writeDocId)); - - readConsistencyStrategyClient.clearCapturedRequests(); - readConsistencyStrategyClient.createDocument(getCollectionLink(), writeDoc, null, false).block(); - - List requests = readConsistencyStrategyClient.getCapturedRequests(); - assertThat(requests).isNotEmpty(); - - HttpRequest createRequest = requests.stream() - .filter(r -> "POST".equalsIgnoreCase(r.httpMethod().toString())) - .findFirst() - .orElse(null); - assertThat(createRequest).as("Expected a document create request").isNotNull(); - - Map headers = createRequest.headers().toMap(); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .as("Write operations should not have readConsistencyStrategy header") - .isFalse(); - } finally { - readConsistencyStrategyClient.close(); - } - } - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void readItem_requestLevelOverridesClientLevel_onlyRequestLevelOnWire() { - String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); - String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); - - ConnectionPolicy gwPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); - - // Client-level readConsistencyStrategy = EVENTUAL - SpyClientUnderTestFactory.ClientUnderTest clientLevelReadConsistencyStrategyClient; - try { - clientLevelReadConsistencyStrategyClient = SpyClientUnderTestFactory.createClientUnderTest( - new URI(endpoint), - key, - gwPolicy, - ConsistencyLevel.SESSION, - ReadConsistencyStrategy.EVENTUAL, - new Configs(), - null, true, new CosmosClientTelemetryConfig()); - } catch (URISyntaxException e) { - throw new RuntimeException(e); - } - - try { - // Request-level readConsistencyStrategy = LATEST_COMMITTED (overrides client-level EVENTUAL) - CosmosItemRequestOptions cosmosItemRequestOptions = new CosmosItemRequestOptions(); - cosmosItemRequestOptions.setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - cosmosItemRequestOptions.setCustomItemSerializer(CosmosItemSerializer.DEFAULT_SERIALIZER); - - clientLevelReadConsistencyStrategyClient.clearCapturedRequests(); - RequestOptions requestOptions = itemOptionsAccessor.toRequestOptions(cosmosItemRequestOptions); - requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); - clientLevelReadConsistencyStrategyClient.readDocument(getDocumentLink(), requestOptions).block(); - - List requests = clientLevelReadConsistencyStrategyClient.getCapturedRequests(); - assertThat(requests).isNotEmpty(); - - HttpRequest docRequest = findDocumentRequest(requests, getDocumentLink()); - assertThat(docRequest).as("Expected a document read request").isNotNull(); - - Map headers = docRequest.headers().toMap(); - assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .as("Request-level readConsistencyStrategy should override client-level") - .isEqualTo("LatestCommitted"); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) - .as("ConsistencyLevel header should be stripped when readConsistencyStrategy is set") - .isFalse(); - } finally { - clientLevelReadConsistencyStrategyClient.close(); - } - } - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void readItem_withClientLevelDefaultReadConsistencyStrategy_noReadConsistencyStrategyHeaderOnWire() { - String endpoint = System.getProperty("ACCOUNT_HOST", System.getenv("ACCOUNT_HOST")); - String key = System.getProperty("ACCOUNT_KEY", System.getenv("ACCOUNT_KEY")); - - ConnectionPolicy gwPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); - - // Client-level readConsistencyStrategy = DEFAULT (transparent — should not appear on wire) - SpyClientUnderTestFactory.ClientUnderTest defaultReadConsistencyStrategyClient; - try { - defaultReadConsistencyStrategyClient = SpyClientUnderTestFactory.createClientUnderTest( - new URI(endpoint), - key, - gwPolicy, - ConsistencyLevel.SESSION, - ReadConsistencyStrategy.DEFAULT, - new Configs(), - null, true, new CosmosClientTelemetryConfig()); - } catch (URISyntaxException e) { - throw new RuntimeException(e); - } - - try { - defaultReadConsistencyStrategyClient.clearCapturedRequests(); - RequestOptions requestOptions = new RequestOptions(); - requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); - defaultReadConsistencyStrategyClient.readDocument(getDocumentLink(), requestOptions).block(); - - List requests = defaultReadConsistencyStrategyClient.getCapturedRequests(); - assertThat(requests).isNotEmpty(); - - HttpRequest docRequest = findDocumentRequest(requests, getDocumentLink()); - assertThat(docRequest).as("Expected a document read request").isNotNull(); - - Map headers = docRequest.headers().toMap(); - assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .as("DEFAULT readConsistencyStrategy at client level should not emit a header — it is transparent") - .isFalse(); - } finally { - defaultReadConsistencyStrategyClient.close(); - } - } - - // endregion - - private static HttpRequest findDocumentRequest(List requests, String documentLink) { - for (HttpRequest request : requests) { - String uri = request.uri().toString(); - if ("GET".equalsIgnoreCase(request.httpMethod().toString()) && uri.contains(documentLink)) { - return request; - } - } - return null; - } -} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategySpyWireTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategySpyWireTest.java new file mode 100644 index 000000000000..78aa2046c049 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategySpyWireTest.java @@ -0,0 +1,500 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +package com.azure.cosmos.implementation; + +import com.azure.cosmos.ConsistencyLevel; +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.CosmosAsyncContainer; +import com.azure.cosmos.CosmosAsyncDatabase; +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.cosmos.GatewayConnectionConfig; +import com.azure.cosmos.Http2ConnectionConfig; +import com.azure.cosmos.ReadConsistencyStrategy; +import com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdConstants; +import com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdRequest; +import com.azure.cosmos.implementation.http.HttpRequest; +import com.azure.cosmos.models.CosmosClientTelemetryConfig; +import com.azure.cosmos.models.CosmosContainerProperties; +import com.azure.cosmos.models.CosmosItemRequestOptions; +import com.azure.cosmos.models.PartitionKey; +import com.azure.cosmos.rx.TestSuiteBase; +import com.fasterxml.jackson.databind.node.ObjectNode; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Spy-wire tests for ReadConsistencyStrategy header propagation across both transports. + * + *

Creates two spy clients that intercept at the HTTP client layer: + *

    + *
  • Gateway V1 (HTTP/1): No thin client enablement. Requests flow through + * {@link RxGatewayStoreModel}. Assertions inspect HTTP headers.
  • + *
  • Gateway V2 (HTTP/2 + thin client): {@code COSMOS.THINCLIENT_ENABLED=true} + + * {@link Http2ConnectionConfig} enabled. Requests flow through {@link ThinClientStoreModel} + * when thin client read locations are available. Assertions inspect the RNTBD binary frame + * in the HTTP body for the ReadConsistencyStrategy token (0x00F0, Byte type).
  • + *
+ * + *

V2 tests are skipped when the test account does not have thin client read locations + * (the spy client falls back to V1 silently — we detect this and skip rather than false-pass). + */ +public class ReadConsistencyStrategySpyWireTest { + private static final Logger logger = LoggerFactory.getLogger(ReadConsistencyStrategySpyWireTest.class); + + private static ImplementationBridgeHelpers.CosmosItemRequestOptionsHelper.CosmosItemRequestOptionsAccessor getItemOptionsAccessor() { + return ImplementationBridgeHelpers.CosmosItemRequestOptionsHelper.getCosmosItemRequestOptionsAccessor(); + } + + private static final long TIMEOUT = 60_000L; + private static final String DOCUMENT_ID = UUID.randomUUID().toString(); + + // V1 transport — HTTP/1, gateway mode, no thin client + private static final String V1 = "GatewayV1"; + // V2 transport — HTTP/2, thin client enabled + private static final String V2 = "GatewayV2"; + + private CosmosAsyncClient cosmosClient; + private CosmosAsyncDatabase database; + private CosmosAsyncContainer container; + private String databaseId; + private String containerId; + + private SpyClientUnderTestFactory.ClientUnderTest v1SpyClient; + private SpyClientUnderTestFactory.ClientUnderTest v2SpyClient; + private boolean v2Available; + + private String savedThinClientProperty; + + @BeforeClass(groups = {"thinclient"}, timeOut = TIMEOUT) + public void beforeClass() { + // Save and set thin client property + savedThinClientProperty = System.getProperty("COSMOS.THINCLIENT_ENABLED"); + System.setProperty("COSMOS.THINCLIENT_ENABLED", "true"); + + cosmosClient = new CosmosClientBuilder() + .endpoint(TestConfigurations.HOST) + .key(TestConfigurations.MASTER_KEY) + .gatewayMode() + .buildAsyncClient(); + + databaseId = "ReadConsistencyStrategy-spy-" + UUID.randomUUID().toString().substring(0, 8); + containerId = "testcontainer"; + + cosmosClient.createDatabaseIfNotExists(databaseId).block(); + + CosmosContainerProperties props = new CosmosContainerProperties(containerId, "/mypk"); + container = TestSuiteBase.createCollection(cosmosClient, databaseId, props); + database = cosmosClient.getDatabase(databaseId); + + // Seed a document + ObjectNode doc = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); + doc.put("id", DOCUMENT_ID); + doc.put("mypk", DOCUMENT_ID); + container.createItem(doc).block(); + + // V1 spy — HTTP/1, no Http2ConnectionConfig → useThinClient = false + v1SpyClient = createSpyClient(null, false); + + // V2 spy — HTTP/2 enabled → useThinClient = true (if thin client locations exist) + v2SpyClient = createSpyClient(null, true); + v2Available = v2SpyClient.useThinClient(); + + if (!v2Available) { + logger.warn("Thin client read locations not available — V2 spy wire tests will be skipped"); + } + + logger.info("Created spy-wire test resources: db={}, container={}, v2Available={}", + databaseId, containerId, v2Available); + } + + @AfterClass(groups = {"thinclient"}, alwaysRun = true) + public void afterClass() { + // Restore thin client property + if (savedThinClientProperty != null) { + System.setProperty("COSMOS.THINCLIENT_ENABLED", savedThinClientProperty); + } else { + System.clearProperty("COSMOS.THINCLIENT_ENABLED"); + } + + if (database != null) { + try { + database.delete().block(); + } catch (Exception e) { + logger.warn("Failed to delete test database", e); + } + } + if (cosmosClient != null) { + cosmosClient.close(); + } + if (v1SpyClient != null) { + v1SpyClient.close(); + } + if (v2SpyClient != null) { + v2SpyClient.close(); + } + } + + @DataProvider(name = "transportModes") + public Object[][] transportModes() { + if (v2Available) { + return new Object[][] { { V1 }, { V2 } }; + } + return new Object[][] { { V1 } }; + } + + // region No contention — single header set + + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes") + public void requestLevelReadConsistencyStrategy_headerOnWire_consistencyLevelStripped(String mode) { + CosmosItemRequestOptions options = new CosmosItemRequestOptions(); + options.setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + assertReadConsistencyStrategyOnWire(mode, spyFor(mode), options, "LatestCommitted", (byte) 0x03, true); + } + + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes") + public void clientLevelReadConsistencyStrategy_headerOnWire_consistencyLevelStripped(String mode) { + SpyClientUnderTestFactory.ClientUnderTest readConsistencyStrategyClient = createSpyClient(ReadConsistencyStrategy.LATEST_COMMITTED, isGatewayV2(mode)); + try { + assertReadConsistencyStrategyOnWire(mode, readConsistencyStrategyClient, new RequestOptions(), "LatestCommitted", (byte) 0x03, true); + } finally { + readConsistencyStrategyClient.close(); + } + } + + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes") + public void defaultReadConsistencyStrategy_noReadConsistencyStrategyHeaderOnWire(String mode) { + CosmosItemRequestOptions options = new CosmosItemRequestOptions(); + options.setReadConsistencyStrategy(ReadConsistencyStrategy.DEFAULT); + + assertNoReadConsistencyStrategyOnWire(mode, spyFor(mode), options); + } + + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes") + public void clientLeveldefaultReadConsistencyStrategy_noReadConsistencyStrategyHeaderOnWire(String mode) { + SpyClientUnderTestFactory.ClientUnderTest defaultReadConsistencyStrategyClient = createSpyClient(ReadConsistencyStrategy.DEFAULT, isGatewayV2(mode)); + try { + assertNoReadConsistencyStrategyOnWire(mode, defaultReadConsistencyStrategyClient, new RequestOptions()); + } finally { + defaultReadConsistencyStrategyClient.close(); + } + } + + // endregion + + // region Contention — both ConsistencyLevel and ReadConsistencyStrategy present, resolution determines the winner + + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes") + public void bothConsistencyLevelAndReadConsistencyStrategy_readConsistencyStrategyWins_consistencyLevelStripped(String mode) { + CosmosItemRequestOptions options = new CosmosItemRequestOptions(); + options.setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + options.setConsistencyLevel(ConsistencyLevel.EVENTUAL); + + assertReadConsistencyStrategyOnWire(mode, spyFor(mode), options, "LatestCommitted", (byte) 0x03, true); + } + + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes") + public void requestLevelReadConsistencyStrategy_overridesClientLevelReadConsistencyStrategy(String mode) { + // Client-level ReadConsistencyStrategy = EVENTUAL (applied to every request header via builder) + // Request-level ReadConsistencyStrategy = LATEST_COMMITTED (per-operation override via requestContext) + // Resolution: request-level wins. + SpyClientUnderTestFactory.ClientUnderTest eventualReadConsistencyStrategyClient = createSpyClient(ReadConsistencyStrategy.EVENTUAL, isGatewayV2(mode)); + try { + CosmosItemRequestOptions options = new CosmosItemRequestOptions(); + options.setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); + + assertReadConsistencyStrategyOnWire(mode, eventualReadConsistencyStrategyClient, options, "LatestCommitted", (byte) 0x03, true); + } finally { + eventualReadConsistencyStrategyClient.close(); + } + } + + // endregion + + // region Write operations — ReadConsistencyStrategy should not appear on writes (V1 only, writes don't route to thin client) + + @Test(groups = {"thinclient"}, timeOut = TIMEOUT) + public void writeWithClientLevelReadConsistencyStrategy_noReadConsistencyStrategyHeaderOnWire() { + SpyClientUnderTestFactory.ClientUnderTest readConsistencyStrategyClient = createSpyClient(ReadConsistencyStrategy.LATEST_COMMITTED, false); + try { + String writeDocId = UUID.randomUUID().toString(); + Document writeDoc = new Document(String.format( + "{ \"id\": \"%s\", \"mypk\": \"%s\" }", writeDocId, writeDocId)); + + readConsistencyStrategyClient.clearCapturedRequests(); + readConsistencyStrategyClient.createDocument(getCollectionLink(), writeDoc, null, false).block(); + + List requests = readConsistencyStrategyClient.getCapturedRequests(); + assertThat(requests).isNotEmpty(); + + HttpRequest createRequest = requests.stream() + .filter(r -> "POST".equalsIgnoreCase(r.httpMethod().toString())) + .findFirst() + .orElse(null); + assertThat(createRequest).as("Expected a document create request").isNotNull(); + + Map headers = createRequest.headers().toMap(); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .as("Write operations should not have ReadConsistencyStrategy header") + .isFalse(); + } finally { + readConsistencyStrategyClient.close(); + } + } + + // endregion + + // region Assertion helpers — branch on transport mode + + private void assertReadConsistencyStrategyOnWire( + String mode, + SpyClientUnderTestFactory.ClientUnderTest client, + CosmosItemRequestOptions cosmosOptions, + String expectedHeaderValue, + byte expectedRntbdByte, + boolean expectClStripped) { + + HttpRequest captured = executeReadAndCapture(mode, client, cosmosOptions); + + if (isGatewayV2(mode)) { + // Verify the request actually routed through thin client (port 10250) + assertThat(captured.uri().toString()) + .as("V2 request should target thin client proxy endpoint (port 10250)") + .contains(":10250"); + + // V2: decode RNTBD frame and inspect typed tokens + RntbdRequest rntbdRequest = decodeRntbdFrame(collectHttpBody(captured)); + Byte readConsistencyStrategyValue = rntbdRequest.getHeader(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); + assertThat(readConsistencyStrategyValue) + .as("ReadConsistencyStrategy token value should be 0x%02X", expectedRntbdByte) + .isNotNull() + .isEqualTo(expectedRntbdByte); + if (expectClStripped) { + Byte clValue = rntbdRequest.getHeader(RntbdConstants.RntbdRequestHeader.ConsistencyLevel); + assertThat(clValue) + .as("ConsistencyLevel RNTBD token should not be set when ReadConsistencyStrategy is active (0 = unset)") + .isEqualTo((byte) 0); + } + } else { + // V1: inspect HTTP headers + Map headers = captured.headers().toMap(); + assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .isEqualTo(expectedHeaderValue); + if (expectClStripped) { + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) + .as("ConsistencyLevel header should be stripped when ReadConsistencyStrategy is set") + .isFalse(); + } + } + } + + private void assertReadConsistencyStrategyOnWire( + String mode, + SpyClientUnderTestFactory.ClientUnderTest client, + RequestOptions requestOptions, + String expectedHeaderValue, + byte expectedRntbdByte, + boolean expectClStripped) { + + HttpRequest captured = executeReadAndCapture(mode, client, requestOptions); + + if (isGatewayV2(mode)) { + assertThat(captured.uri().toString()) + .as("V2 request should target thin client proxy endpoint (port 10250)") + .contains(":10250"); + + RntbdRequest rntbdRequest = decodeRntbdFrame(collectHttpBody(captured)); + Byte readConsistencyStrategyValue = rntbdRequest.getHeader(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); + assertThat(readConsistencyStrategyValue) + .as("ReadConsistencyStrategy token value should be 0x%02X", expectedRntbdByte) + .isNotNull() + .isEqualTo(expectedRntbdByte); + if (expectClStripped) { + Byte clValue = rntbdRequest.getHeader(RntbdConstants.RntbdRequestHeader.ConsistencyLevel); + assertThat(clValue) + .as("ConsistencyLevel RNTBD token should not be set when ReadConsistencyStrategy is active (0 = unset)") + .isEqualTo((byte) 0); + } + } else { + Map headers = captured.headers().toMap(); + assertThat(headers.get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .isEqualTo(expectedHeaderValue); + if (expectClStripped) { + assertThat(headers.containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) + .as("ConsistencyLevel header should be stripped when ReadConsistencyStrategy is set") + .isFalse(); + } + } + } + + private void assertNoReadConsistencyStrategyOnWire(String mode, SpyClientUnderTestFactory.ClientUnderTest client, CosmosItemRequestOptions cosmosOptions) { + HttpRequest captured = executeReadAndCapture(mode, client, cosmosOptions); + + if (isGatewayV2(mode)) { + assertThat(captured.uri().toString()) + .as("V2 request should target thin client proxy endpoint (port 10250)") + .contains(":10250"); + + RntbdRequest rntbdRequest = decodeRntbdFrame(collectHttpBody(captured)); + Byte readConsistencyStrategyValue = rntbdRequest.getHeader(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); + assertThat(readConsistencyStrategyValue) + .as("ReadConsistencyStrategy RNTBD token should not be set when DEFAULT (0 = unset)") + .isEqualTo((byte) 0); + } else { + Map headers = captured.headers().toMap(); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .as("DEFAULT ReadConsistencyStrategy should not emit a header") + .isFalse(); + } + } + + private void assertNoReadConsistencyStrategyOnWire(String mode, SpyClientUnderTestFactory.ClientUnderTest client, RequestOptions requestOptions) { + HttpRequest captured = executeReadAndCapture(mode, client, requestOptions); + + if (isGatewayV2(mode)) { + assertThat(captured.uri().toString()) + .as("V2 request should target thin client proxy endpoint (port 10250)") + .contains(":10250"); + + RntbdRequest rntbdRequest = decodeRntbdFrame(collectHttpBody(captured)); + Byte readConsistencyStrategyValue = rntbdRequest.getHeader(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); + assertThat(readConsistencyStrategyValue) + .as("ReadConsistencyStrategy RNTBD token should not be set when DEFAULT (0 = unset)") + .isEqualTo((byte) 0); + } else { + Map headers = captured.headers().toMap(); + assertThat(headers.containsKey(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) + .as("DEFAULT ReadConsistencyStrategy should not emit a header") + .isFalse(); + } + } + + // endregion + + // region Execution + capture helpers + + private HttpRequest executeReadAndCapture(String mode, SpyClientUnderTestFactory.ClientUnderTest client, CosmosItemRequestOptions cosmosOptions) { + client.clearCapturedRequests(); + RequestOptions requestOptions = getItemOptionsAccessor().toRequestOptions(cosmosOptions); + requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); + client.readDocument(getDocumentLink(), requestOptions).block(); + + List requests = client.getCapturedRequests(); + assertThat(requests).isNotEmpty(); + + HttpRequest docRequest = findDocumentReadRequest(mode, requests); + assertThat(docRequest).as("Expected a document read request").isNotNull(); + return docRequest; + } + + private HttpRequest executeReadAndCapture(String mode, SpyClientUnderTestFactory.ClientUnderTest client, RequestOptions requestOptions) { + client.clearCapturedRequests(); + requestOptions.setPartitionKey(new PartitionKey(DOCUMENT_ID)); + client.readDocument(getDocumentLink(), requestOptions).block(); + + List requests = client.getCapturedRequests(); + assertThat(requests).isNotEmpty(); + + HttpRequest docRequest = findDocumentReadRequest(mode, requests); + assertThat(docRequest).as("Expected a document read request").isNotNull(); + return docRequest; + } + + // endregion + + // region Factory + utility helpers + + private SpyClientUnderTestFactory.ClientUnderTest spyFor(String mode) { + return isGatewayV2(mode) ? v2SpyClient : v1SpyClient; + } + + private static boolean isGatewayV2(String mode) { + return V2.equals(mode); + } + + private SpyClientUnderTestFactory.ClientUnderTest createSpyClient(ReadConsistencyStrategy ReadConsistencyStrategy, boolean http2Enabled) { + ConnectionPolicy gwPolicy = new ConnectionPolicy(GatewayConnectionConfig.getDefaultConfig()); + if (http2Enabled) { + gwPolicy.setHttp2ConnectionConfig(new Http2ConnectionConfig().setEnabled(true)); + } + try { + return SpyClientUnderTestFactory.createClientUnderTest( + new URI(TestConfigurations.HOST), + TestConfigurations.MASTER_KEY, + gwPolicy, + ConsistencyLevel.SESSION, + ReadConsistencyStrategy, + new Configs(), + null, + true, + new CosmosClientTelemetryConfig()); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + } + + private String getDocumentLink() { + return "dbs/" + databaseId + "/colls/" + containerId + "/docs/" + DOCUMENT_ID; + } + + private String getCollectionLink() { + return "dbs/" + databaseId + "/colls/" + containerId; + } + + private HttpRequest findDocumentReadRequest(String mode, List requests) { + for (HttpRequest request : requests) { + String uri = request.uri().toString(); + if (isGatewayV2(mode)) { + // Thin client sends all requests as POST to proxy (:10250) with RNTBD frame body + if ("POST".equalsIgnoreCase(request.httpMethod().toString()) && uri.contains(":10250")) { + return request; + } + } else { + // Gateway V1 sends document reads as GET with the document link in the URI + if ("GET".equalsIgnoreCase(request.httpMethod().toString()) && uri.contains(getDocumentLink())) { + return request; + } + } + } + return null; + } + + // endregion + + // region RNTBD frame inspection helpers (for V2 assertions) + + private static byte[] collectHttpBody(HttpRequest httpRequest) { + return httpRequest.body().reduce((a, b) -> { + byte[] merged = new byte[a.length + b.length]; + System.arraycopy(a, 0, merged, 0, a.length); + System.arraycopy(b, 0, merged, a.length, b.length); + return merged; + }).block(); + } + + /** + * Decodes the RNTBD binary frame and returns the typed request object. + * Uses the production decoder (RntbdRequest.decode) so token presence/absence + * is determined by the actual RNTBD wire format, not brute-force byte scanning. + */ + private static RntbdRequest decodeRntbdFrame(byte[] rntbdFrame) { + ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); + return RntbdRequest.decode(buffer); + } + + // endregion +} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java index cfacc982c65a..d566bfde6392 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java @@ -300,82 +300,6 @@ public void validateApiType() throws Exception { assertThat(headers.toMap().get(HttpConstants.HttpHeaders.API_TYPE)).isEqualTo(apiType.toString()); } - /** - * Verifies that when readConsistencyStrategy is set on a request alongside consistency-level, - * the outbound HTTP request has the readConsistencyStrategy header and consistency-level is - * stripped. This guards the header-copy fix in applySessionToken() — if the - * {@code new HashMap<>(request.getHeaders())} copy is removed, getReadConsistencyStrategyToUse() - * would mutate the original headers before resolveEffectiveConsistencyHeaders() runs. - */ - @Test(groups = "unit") - public void readConsistencyStrategyHeader_preservedOnWire_consistencyLevelStripped() throws Exception { - DiagnosticsClientContext clientContext = mockDiagnosticsClientContext(); - ISessionContainer sessionContainer = Mockito.mock(ISessionContainer.class); - Mockito.doReturn("1#100#1=20#2=5#3=30").when(sessionContainer).resolveGlobalSessionToken(any()); - - GlobalEndpointManager globalEndpointManager = Mockito.mock(GlobalEndpointManager.class); - Mockito.doReturn(new RegionalRoutingContext(new URI("https://localhost"))) - .when(globalEndpointManager).resolveServiceEndpoint(any()); - - HttpClient httpClient = Mockito.mock(HttpClient.class); - ArgumentCaptor httpClientRequestCaptor = ArgumentCaptor.forClass(HttpRequest.class); - Mockito.when(httpClient.send(any(), any())).thenReturn(Mono.error(new ConnectTimeoutException())); - - GatewayServiceConfigurationReader gatewayServiceConfigurationReader = - Mockito.mock(GatewayServiceConfigurationReader.class); - Mockito.doReturn(ConsistencyLevel.SESSION) - .when(gatewayServiceConfigurationReader).getDefaultConsistencyLevel(); - - RxGatewayStoreModel storeModel = new RxGatewayStoreModel( - clientContext, - sessionContainer, - ConsistencyLevel.SESSION, - QueryCompatibilityMode.Default, - new UserAgentContainer(), - globalEndpointManager, - httpClient, - ApiType.SQL); - storeModel.setGatewayServiceConfigurationReader(gatewayServiceConfigurationReader); - - RxDocumentServiceRequest dsr = RxDocumentServiceRequest.createFromName( - clientContext, - OperationType.Read, - "/fakeResourceFullName", - ResourceType.Document); - - dsr.requestContext.regionalRoutingContextToRoute = - new RegionalRoutingContext(new URI("https://localhost")); - - // Set both headers — readConsistencyStrategy should win, consistency-level should be stripped - dsr.getHeaders().put( - HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, - ReadConsistencyStrategy.LATEST_COMMITTED.toString()); - dsr.getHeaders().put( - HttpConstants.HttpHeaders.CONSISTENCY_LEVEL, - ConsistencyLevel.SESSION.toString()); - - try { - storeModel.processMessage(dsr).block(); - fail("Request should fail with ConnectTimeoutException"); - } catch (Exception e) { - // expected — mock returns error - } - - Mockito.verify(httpClient, Mockito.atLeastOnce()).send(httpClientRequestCaptor.capture(), any()); - // Retries may fire multiple requests — take the last captured one - List allRequests = httpClientRequestCaptor.getAllValues(); - HttpRequest capturedRequest = allRequests.get(allRequests.size() - 1); - HttpHeaders capturedHeaders = ReflectionUtils.getHttpHeaders(capturedRequest); - - assertThat(capturedHeaders.toMap().get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY)) - .as("readConsistencyStrategy header must survive the applySessionToken + resolveEffectiveConsistencyHeaders pipeline") - .isEqualTo("LatestCommitted"); - assertThat(capturedHeaders.toMap().containsKey(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL)) - .as("consistency-level header must be stripped when readConsistencyStrategy is set — " - + "dual headers cause compute gateway rejection") - .isFalse(); - } - public void validateFailure(Mono observable, FailureValidator validator) { validateFailure(observable, validator, TIMEOUT); diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java index b1782be3e333..4102c4007049 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java @@ -44,21 +44,21 @@ * * *

Consistency headers decision matrix

- * Users can set ConsistencyLevel (CL) and ReadConsistencyStrategy (RCS) at both client and + * Users can set ConsistencyLevel (ConsistencyLevel) and ReadConsistencyStrategy (ReadConsistencyStrategy) at both client and * request level. The SDK resolves contention before wire serialization: *
- * | Client CL | Client RCS | Request CL | Request RCS | Effective on wire           |
+ * | Client ConsistencyLevel | Client ReadConsistencyStrategy | Request ConsistencyLevel | Request ReadConsistencyStrategy | Effective on wire           |
  * |-----------|------------|------------|-------------|-----------------------------|
- * | Session   | —          | —          | —           | CL=Session (default)        |
- * | Session   | —          | —          | LC          | RCS=LC, CL stripped         |
- * | Session   | Eventual   | —          | LC          | RCS=LC (req RCS > client)   |
- * | Session   | Eventual   | Eventual   | —           | RCS=Eventual, CL stripped   |
- * | Session   | —          | Eventual   | LC          | RCS=LC (req RCS > req CL)   |
- * | Session   | LC         | —          | —           | RCS=LC, CL stripped         |
+ * | Session   | —          | —          | —           | ConsistencyLevel=Session (default)        |
+ * | Session   | —          | —          | LC          | ReadConsistencyStrategy=LC, ConsistencyLevel stripped         |
+ * | Session   | Eventual   | —          | LC          | ReadConsistencyStrategy=LC (req ReadConsistencyStrategy > client)   |
+ * | Session   | Eventual   | Eventual   | —           | ReadConsistencyStrategy=Eventual, ConsistencyLevel stripped   |
+ * | Session   | —          | Eventual   | LC          | ReadConsistencyStrategy=LC (req ReadConsistencyStrategy > req ConsistencyLevel)   |
+ * | Session   | LC         | —          | —           | ReadConsistencyStrategy=LC, ConsistencyLevel stripped         |
  * | Session   | —          | —          | GLOBAL_STRONG| BadRequestException (non-Strong acct) |
  * 
- * Resolution rule: request-level RCS > client-level RCS > CL. When a non-DEFAULT RCS is - * effective, CL is stripped to prevent dual-header rejection by the compute gateway or proxy. + * Resolution rule: request-level ReadConsistencyStrategy > client-level ReadConsistencyStrategy > ConsistencyLevel. When a non-DEFAULT ReadConsistencyStrategy is + * effective, ConsistencyLevel is stripped to prevent dual-header rejection by the compute gateway or proxy. * *

Test regions

*
    @@ -66,8 +66,8 @@ *
  1. ThinClientStoreModel encoding — {@code wrapInHttpRequest()} produces correct RNTBD * frame bytes for each strategy value.
  2. *
  3. Resolve + encode pipeline — {@code resolveEffectiveConsistencyHeaders()} followed by - * {@code wrapInHttpRequest()} produces the correct frame for contention scenarios (both CL - * and RCS set, request-level overrides client-level, DEFAULT is transparent).
  4. + * {@code wrapInHttpRequest()} produces the correct frame for contention scenarios (both ConsistencyLevel + * and ReadConsistencyStrategy set, request-level overrides client-level, DEFAULT is transparent). *
*/ public class RntbdReadConsistencyStrategyHeaderTests { @@ -186,7 +186,7 @@ public void readConsistencyStrategyHttpHeaderConstant() { .isEqualTo("x-ms-cosmos-read-consistency-strategy"); } - // region No contention — single header encoding. Only one of CL or RCS is set (or neither). + // region No contention — single header encoding. Only one of ConsistencyLevel or ReadConsistencyStrategy is set (or neither). // No resolution needed; tests pure RNTBD encoder correctness. @Test(groups = { "unit" }, dataProvider = "readConsistencyStrategyStringToRntbdByteValues") @@ -237,7 +237,7 @@ public void thinClient_wrapInHttpRequest_noReadConsistencyStrategyHeader_noRntbd } @Test(groups = { "unit" }) - public void thinClient_wrapInHttpRequest_readConsistencyStrategyPresent_clAbsent() throws Exception { + public void thinClient_wrapInHttpRequest_readConsistencyStrategyPresent_consistencyLevelAbsent() throws Exception { ThinClientStoreModel storeModel = createMockThinClientStoreModel(); RxDocumentServiceRequest request = createDocumentReadRequest(); @@ -263,15 +263,15 @@ public void thinClient_wrapInHttpRequest_readConsistencyStrategyPresent_clAbsent // endregion - // region Contention — both CL and RCS headers present. Tests resolveEffectiveConsistencyHeaders() + // region Contention — both ConsistencyLevel and ReadConsistencyStrategy headers present. Tests resolveEffectiveConsistencyHeaders() // followed by wrapInHttpRequest() to verify the correct header wins on the wire. @Test(groups = { "unit" }) public void thinClient_resolveAndWrap_bothClAndReadConsistencyStrategy_onlyReadConsistencyStrategySurvivesInFrame() throws Exception { - // End-to-end chain: dirty headers (both CL and readConsistencyStrategy set) - // → resolveEffectiveConsistencyHeaders (strips CL) + // End-to-end chain: dirty headers (both ConsistencyLevel and readConsistencyStrategy set) + // → resolveEffectiveConsistencyHeaders (strips ConsistencyLevel) // → wrapInHttpRequest (encodes RNTBD frame) - // → verify only readConsistencyStrategy in the frame, CL absent + // → verify only readConsistencyStrategy in the frame, ConsistencyLevel absent ThinClientStoreModel storeModel = createMockThinClientStoreModel(); RxDocumentServiceRequest request = createDocumentReadRequest(); @@ -303,9 +303,9 @@ public void thinClient_resolveAndWrap_bothClAndReadConsistencyStrategy_onlyReadC @Test(groups = { "unit" }) public void thinClient_resolveAndWrap_requestContextReadConsistencyStrategy_overridesHeaderReadConsistencyStrategy() throws Exception { - // Header-level RCS ("Eventual") = set by CosmosClientBuilder.readConsistencyStrategy(), + // Header-level ReadConsistencyStrategy ("Eventual") = set by CosmosClientBuilder.readConsistencyStrategy(), // applied to every request via getRequestHeaders(). - // Request-level RCS (LATEST_COMMITTED) = set by CosmosItemRequestOptions.setReadConsistencyStrategy(), + // Request-level ReadConsistencyStrategy (LATEST_COMMITTED) = set by CosmosItemRequestOptions.setReadConsistencyStrategy(), // a per-operation override stored in requestContext. // Resolution rule: requestContext (per-request) > headers (client-level). ThinClientStoreModel storeModel = createMockThinClientStoreModel(); @@ -336,8 +336,8 @@ public void thinClient_resolveAndWrap_requestContextReadConsistencyStrategy_over } @Test(groups = { "unit" }) - public void thinClient_resolveAndWrap_defaultReadConsistencyStrategy_clSurvives() throws Exception { - // DEFAULT readConsistencyStrategy is transparent — CL should remain in the RNTBD frame + public void thinClient_resolveAndWrap_defaultReadConsistencyStrategy_consistencyLevelSurvives() throws Exception { + // DEFAULT readConsistencyStrategy is transparent — ConsistencyLevel should remain in the RNTBD frame ThinClientStoreModel storeModel = createMockThinClientStoreModel(); RxDocumentServiceRequest request = createDocumentReadRequest(); From e5418f1e48ba9f73f35ee386be9758476f46440a Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Mon, 27 Apr 2026 17:03:46 -0400 Subject: [PATCH 32/46] Refactoring --- .../azure/cosmos/implementation/RxGatewayStoreModelTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java index d566bfde6392..54440ecfabc5 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/RxGatewayStoreModelTest.java @@ -5,7 +5,6 @@ import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.CosmosException; -import com.azure.cosmos.ReadConsistencyStrategy; import com.azure.cosmos.implementation.directconnectivity.GatewayServiceConfigurationReader; import com.azure.cosmos.implementation.directconnectivity.ReflectionUtils; import com.azure.cosmos.implementation.http.HttpClient; @@ -28,7 +27,6 @@ import java.net.SocketException; import java.net.URI; import java.time.Duration; -import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import static com.azure.cosmos.implementation.TestUtils.mockDiagnosticsClientContext; From a275926e9863796b311c5fc14602aba7ec6ee918 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Mon, 27 Apr 2026 17:09:59 -0400 Subject: [PATCH 33/46] Fix unified E2E test: standalone pattern without TestSuiteBase inheritance - Remove TestSuiteBase inheritance to avoid @BeforeSuite shared container init which fails on serverless accounts (provisioned throughput not supported) - Use TestSuiteBase.createCollection as static utility for no-throughput containers - Set COSMOS.THINCLIENT_ENABLED system property in @BeforeClass for V2 detection - Configure HTTP/2 via GatewayConnectionConfig.setHttp2ConnectionConfig for V2 builder - Probe V2 availability at startup via diagnostics endpoint check - All 30 tests pass (15 V1 + 15 V2) against swkrish-session Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...GatewayReadConsistencyStrategyE2ETest.java | 523 ------------------ ...va => ReadConsistencyStrategyE2ETest.java} | 465 +++++++++------- 2 files changed, 250 insertions(+), 738 deletions(-) delete mode 100644 sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java rename sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/{implementation/ThinClientReadConsistencyStrategyE2ETest.java => ReadConsistencyStrategyE2ETest.java} (50%) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java deleted file mode 100644 index 0f5dad1b2097..000000000000 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/GatewayReadConsistencyStrategyE2ETest.java +++ /dev/null @@ -1,523 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.cosmos; - -import com.azure.cosmos.implementation.BadRequestException; -import com.azure.cosmos.implementation.TestConfigurations; -import com.azure.cosmos.models.CosmosChangeFeedRequestOptions; -import com.azure.cosmos.models.CosmosContainerProperties; -import com.azure.cosmos.models.CosmosItemIdentity; -import com.azure.cosmos.models.CosmosItemRequestOptions; -import com.azure.cosmos.models.CosmosItemResponse; -import com.azure.cosmos.models.CosmosQueryRequestOptions; -import com.azure.cosmos.models.CosmosReadManyRequestOptions; -import com.azure.cosmos.models.CosmosRequestOptions; -import com.azure.cosmos.models.FeedRange; -import com.azure.cosmos.models.FeedResponse; -import com.azure.cosmos.models.PartitionKey; -import com.azure.cosmos.models.SqlParameter; -import com.azure.cosmos.models.SqlQuerySpec; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; -import reactor.test.StepVerifier; - -import java.util.Arrays; -import java.util.List; -import java.util.UUID; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.catchThrowable; - -/** - * E2E tests for ReadConsistencyStrategy through compute gateway (Gateway V1) mode. - * Verifies that the HTTP header x-ms-cosmos-read-consistency-strategy is - * correctly sent to the compute gateway and processed. - * - * Covers all request option types that expose ReadConsistencyStrategy: - * - CosmosItemRequestOptions (point reads) - * - CosmosQueryRequestOptions (queries) - * - CosmosChangeFeedRequestOptions (change feed) - * - CosmosReadManyRequestOptions (read many) - * - CosmosClientBuilder (client-level default) - * - * Uses TestConfigurations for account credentials. - * Run with test group "fast". - */ -public class GatewayReadConsistencyStrategyE2ETest { - private static final Logger logger = LoggerFactory.getLogger(GatewayReadConsistencyStrategyE2ETest.class); - private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); - private static final long TIMEOUT = 60_000L; - - private CosmosAsyncClient client; - private CosmosAsyncDatabase database; - private CosmosAsyncContainer container; - private String databaseId; - private String containerId; - - @BeforeClass(groups = {"fast"}) - public void beforeClass() { - client = createGatewayBuilder().buildAsyncClient(); - - databaseId = "readConsistencyStrategy-gw-" + UUID.randomUUID().toString().substring(0, 8); - containerId = "testcontainer"; - - client.createDatabaseIfNotExists(databaseId).block(); - database = client.getDatabase(databaseId); - - CosmosContainerProperties containerProperties = new CosmosContainerProperties(containerId, "/pk"); - database.createContainerIfNotExists(containerProperties).block(); - container = database.getContainer(containerId); - - logger.info("Created test database {} and container {}", databaseId, containerId); - } - - @AfterClass(groups = {"fast"}, alwaysRun = true) - public void afterClass() { - if (database != null) { - try { - database.delete().block(); - logger.info("Deleted test database {}", databaseId); - } catch (Exception e) { - logger.warn("Failed to delete test database", e); - } - } - safeClose(client); - } - - // region ItemRequestOptions - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_readItem_withLatestCommitted() { - String id = UUID.randomUUID().toString(); - createAndInsertDocument(id); - - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - - CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - } - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_readItem_withEventual() { - String id = UUID.randomUUID().toString(); - createAndInsertDocument(id); - - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); - - CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.EVENTUAL); - } - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_readItem_withSession() { - String id = UUID.randomUUID().toString(); - createAndInsertDocument(id); - - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.SESSION); - - CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.SESSION); - } - - // endregion - - // region QueryRequestOptions - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_queryItems_withLatestCommitted() { - String id = UUID.randomUUID().toString(); - createAndInsertDocument(id); - - CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() - .setPartitionKey(new PartitionKey(id)) - .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - - SqlQuerySpec querySpec = new SqlQuerySpec("SELECT * FROM c WHERE c.id=@id"); - querySpec.setParameters(Arrays.asList(new SqlParameter("@id", id))); - - FeedResponse response = container - .queryItems(querySpec, queryOptions, ObjectNode.class) - .byPage() - .blockFirst(); - - assertThat(response).isNotNull(); - assertThat(response.getResults()).isNotNull(); - assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - } - - // endregion - - // region ReadAllItems (uses CosmosQueryRequestOptions) - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_readAllItems_withLatestCommitted() { - String pk = UUID.randomUUID().toString(); - createAndInsertDocument(UUID.randomUUID().toString(), pk); - - CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - - FeedResponse response = container - .readAllItems(new PartitionKey(pk), queryOptions, ObjectNode.class) - .byPage() - .blockFirst(); - - assertThat(response).isNotNull(); - assertThat(response.getResults()).isNotNull(); - assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - } - - // endregion - - // region ChangeFeedRequestOptions - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_changeFeed_withLatestCommitted() { - String pkValue = UUID.randomUUID().toString(); - createAndInsertDocument(pkValue); - - CosmosChangeFeedRequestOptions cfOptions = CosmosChangeFeedRequestOptions - .createForProcessingFromBeginning( - FeedRange.forLogicalPartition(new PartitionKey(pkValue))) - .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - - List> pages = container - .queryChangeFeed(cfOptions, ObjectNode.class) - .byPage() - .collectList() - .block(); - - assertThat(pages).isNotNull(); - assertThat(pages.isEmpty()).isFalse(); - - FeedResponse firstPage = pages.get(0); - assertEffectiveReadConsistencyStrategy(firstPage.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - } - - // endregion - - // region ReadManyRequestOptions - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_readMany_withLatestCommitted() { - String pkValue = UUID.randomUUID().toString(); - String id1 = UUID.randomUUID().toString(); - String id2 = UUID.randomUUID().toString(); - createAndInsertDocument(id1, pkValue); - createAndInsertDocument(id2, pkValue); - - List identities = Arrays.asList( - new CosmosItemIdentity(new PartitionKey(pkValue), id1), - new CosmosItemIdentity(new PartitionKey(pkValue), id2)); - - CosmosReadManyRequestOptions readManyOptions = new CosmosReadManyRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - - FeedResponse response = - container.readMany(identities, readManyOptions, ObjectNode.class).block(); - - assertThat(response).isNotNull(); - assertThat(response.getResults()).isNotNull(); - assertThat(response.getResults().size()).isEqualTo(2); - assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - } - - // endregion - - // region Client-level readConsistencyStrategy - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_clientLevel_latestCommitted_readItem() { - CosmosAsyncClient clientWithReadConsistencyStrategy = null; - try { - clientWithReadConsistencyStrategy = createGatewayBuilder() - .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) - .buildAsyncClient(); - CosmosAsyncContainer containerWithReadConsistencyStrategy = clientWithReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); - - String id = UUID.randomUUID().toString(); - createAndInsertDocument(containerWithReadConsistencyStrategy, id); - - CosmosItemResponse response = - containerWithReadConsistencyStrategy.readItem(id, new PartitionKey(id), ObjectNode.class).block(); - - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - } finally { - safeClose(clientWithReadConsistencyStrategy); - } - } - - // endregion - - // region Write operations — readConsistencyStrategy forced to DEFAULT - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_writeItem_readConsistencyStrategyIgnored() { - CosmosAsyncClient clientWithReadConsistencyStrategy = null; - try { - clientWithReadConsistencyStrategy = createGatewayBuilder() - .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) - .buildAsyncClient(); - CosmosAsyncContainer containerWithReadConsistencyStrategy = clientWithReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); - - String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); - - CosmosItemResponse response = - containerWithReadConsistencyStrategy.createItem(doc, new PartitionKey(id), null).block(); - - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(201); - assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.DEFAULT); - } finally { - safeClose(clientWithReadConsistencyStrategy); - } - } - - // endregion - - // region Validation — GLOBAL_STRONG on Session account - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_readItem_globalStrong_invalidAccount_throwsBadRequest() { - String id = UUID.randomUUID().toString(); - createAndInsertDocument(id); - - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.GLOBAL_STRONG); - - Throwable caughtError = null; - try { - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - } catch (Throwable t) { - caughtError = t; - } - - assertThat(caughtError) - .as("Expected BadRequestException for GLOBAL_STRONG on Session account") - .isNotNull() - .isInstanceOf(BadRequestException.class); - assertThat(caughtError.getMessage()).contains("read-consistency-strategy"); - logger.info("Expected BadRequestException for GLOBAL_STRONG: {}", caughtError.getMessage()); - } - - // endregion - - // region Both ConsistencyLevel and readConsistencyStrategy — readConsistencyStrategy wins - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_bothConsistencyLevelAndReadConsistencyStrategy_readConsistencyStrategyWins() { - CosmosAsyncClient clientWithBoth = null; - try { - clientWithBoth = createGatewayBuilder() - .consistencyLevel(ConsistencyLevel.EVENTUAL) - .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) - .buildAsyncClient(); - CosmosAsyncContainer containerWithBoth = clientWithBoth.getDatabase(databaseId).getContainer(containerId); - - String id = UUID.randomUUID().toString(); - createAndInsertDocument(containerWithBoth, id); - - CosmosItemResponse response = - containerWithBoth.readItem(id, new PartitionKey(id), ObjectNode.class).block(); - - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - } finally { - safeClose(clientWithBoth); - } - } - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_requestLevel_bothClAndReadConsistencyStrategy_readConsistencyStrategyWins() { - // Request-level contention: options set both ConsistencyLevel and readConsistencyStrategy. - // readConsistencyStrategy should win — gateway must not reject with dual-header error. - String id = UUID.randomUUID().toString(); - createAndInsertDocument(id); - - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setConsistencyLevel(ConsistencyLevel.EVENTUAL) - .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - - CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - } - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_requestLevelReadConsistencyStrategy_overridesClientLevelReadConsistencyStrategy() { - // Request-level readConsistencyStrategy should override client-level readConsistencyStrategy. - CosmosAsyncClient clientWithClientReadConsistencyStrategy = null; - try { - clientWithClientReadConsistencyStrategy = createGatewayBuilder() - .readConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL) - .buildAsyncClient(); - CosmosAsyncContainer containerWithReadConsistencyStrategy = clientWithClientReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); - - String id = UUID.randomUUID().toString(); - createAndInsertDocument(containerWithReadConsistencyStrategy, id); - - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - - CosmosItemResponse response = - containerWithReadConsistencyStrategy.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - } finally { - safeClose(clientWithClientReadConsistencyStrategy); - } - } - - // endregion - - // region Operation policy (dynamic request options) — readConsistencyStrategy set via CosmosOperationPolicy - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_operationPolicy_setsReadConsistencyStrategy() { - // Verifies that readConsistencyStrategy set dynamically via CosmosOperationPolicy - // (CosmosRequestOptions.setReadConsistencyStrategy) propagates end-to-end through - // the gateway pipeline and is reflected in CosmosDiagnostics. - CosmosAsyncClient policyClient = null; - try { - policyClient = createGatewayBuilder() - .addOperationPolicy(cosmosOperationDetails -> { - CosmosRequestOptions overrides = new CosmosRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - cosmosOperationDetails.setRequestOptions(overrides); - }) - .buildAsyncClient(); - CosmosAsyncContainer policyContainer = policyClient.getDatabase(databaseId).getContainer(containerId); - - String id = UUID.randomUUID().toString(); - createAndInsertDocument(policyContainer, id); - - CosmosItemResponse response = - policyContainer.readItem(id, new PartitionKey(id), ObjectNode.class).block(); - - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - } finally { - safeClose(policyClient); - } - } - - @Test(groups = {"fast"}, timeOut = TIMEOUT) - public void gateway_operationPolicy_readConsistencyStrategyOverridesRequestLevel() { - // Verifies that readConsistencyStrategy set via operation policy takes effect - // even when request-level options set a different readConsistencyStrategy. - // Operation policy runs AFTER request options are set, so it should win. - CosmosAsyncClient policyClient = null; - try { - policyClient = createGatewayBuilder() - .addOperationPolicy(cosmosOperationDetails -> { - CosmosRequestOptions overrides = new CosmosRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); - cosmosOperationDetails.setRequestOptions(overrides); - }) - .buildAsyncClient(); - CosmosAsyncContainer policyContainer = policyClient.getDatabase(databaseId).getContainer(containerId); - - String id = UUID.randomUUID().toString(); - createAndInsertDocument(policyContainer, id); - - // Request-level sets LATEST_COMMITTED, but the operation policy overrides to EVENTUAL - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - - CosmosItemResponse response = - policyContainer.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); - assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.EVENTUAL); - } finally { - safeClose(policyClient); - } - } - - // endregion - - // region Helpers - - private CosmosClientBuilder createGatewayBuilder() { - return new CosmosClientBuilder() - .endpoint(TestConfigurations.HOST) - .key(TestConfigurations.MASTER_KEY) - .gatewayMode() - .consistencyLevel(ConsistencyLevel.SESSION); - } - - private ObjectNode createDocument(String id) { - return createDocument(id, id); - } - - private ObjectNode createDocument(String id, String pk) { - ObjectNode doc = OBJECT_MAPPER.createObjectNode(); - doc.put("id", id); - doc.put("pk", pk); - return doc; - } - - private void createAndInsertDocument(String id) { - createAndInsertDocument(id, id); - } - - private void createAndInsertDocument(String id, String pk) { - ObjectNode doc = createDocument(id, pk); - container.createItem(doc, new PartitionKey(pk), null).block(); - } - - private void createAndInsertDocument(CosmosAsyncContainer targetContainer, String id) { - ObjectNode doc = createDocument(id); - targetContainer.createItem(doc, new PartitionKey(id), null).block(); - } - - private static void assertEffectiveReadConsistencyStrategy(CosmosDiagnostics diagnostics, ReadConsistencyStrategy expected) { - assertThat(diagnostics).isNotNull(); - assertThat(diagnostics.getDiagnosticsContext()).isNotNull(); - assertThat(diagnostics.getDiagnosticsContext().getEffectiveReadConsistencyStrategy()) - .isEqualTo(expected); - } - - private static void safeClose(CosmosAsyncClient clientToClose) { - if (clientToClose != null) { - try { - clientToClose.close(); - } catch (Exception e) { - logger.warn("Failed to close client", e); - } - } - } - - // endregion -} diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/ReadConsistencyStrategyE2ETest.java similarity index 50% rename from sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java rename to sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/ReadConsistencyStrategyE2ETest.java index 74670d6e7f19..19697fbc5ae8 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ThinClientReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/ReadConsistencyStrategyE2ETest.java @@ -1,17 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos.implementation; - -import com.azure.cosmos.ConsistencyLevel; -import com.azure.cosmos.CosmosAsyncClient; -import com.azure.cosmos.CosmosAsyncContainer; -import com.azure.cosmos.CosmosAsyncDatabase; -import com.azure.cosmos.CosmosClientBuilder; -import com.azure.cosmos.CosmosDiagnostics; -import com.azure.cosmos.CosmosDiagnosticsContext; -import com.azure.cosmos.CosmosDiagnosticsRequestInfo; -import com.azure.cosmos.FlakyTestRetryAnalyzer; -import com.azure.cosmos.ReadConsistencyStrategy; +package com.azure.cosmos; + +import com.azure.cosmos.implementation.BadRequestException; +import com.azure.cosmos.implementation.TestConfigurations; import com.azure.cosmos.models.CosmosChangeFeedRequestOptions; import com.azure.cosmos.models.CosmosContainerProperties; import com.azure.cosmos.models.CosmosItemIdentity; @@ -25,12 +17,14 @@ import com.azure.cosmos.models.PartitionKey; import com.azure.cosmos.models.SqlParameter; import com.azure.cosmos.models.SqlQuerySpec; +import com.azure.cosmos.rx.TestSuiteBase; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; +import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import java.util.Arrays; @@ -41,122 +35,159 @@ import static org.assertj.core.api.AssertionsForClassTypes.assertThat; /** - * E2E tests for ReadConsistencyStrategy propagation through thin client (Gateway V2) mode. - * Verifies that the RNTBD header 0x00F0 (ReadConsistencyStrategy) is correctly - * sent to the proxy and that the proxy applies the strategy server-side. + * Unified E2E tests for ReadConsistencyStrategy propagation across Gateway V1 and Gateway V2. + * + *

Creates two {@link CosmosAsyncClient} instances — one for each transport: + *

    + *
  • Gateway V1 (HTTP/1): Standard gateway mode.
  • + *
  • Gateway V2 (HTTP/2 + thin client): Gateway mode with thin client JVM flag enabled. + * V2 tests additionally assert that requests target the thin client endpoint ({@code :10250}).
  • + *
* - * Covers all request option types that expose ReadConsistencyStrategy: - * - CosmosItemRequestOptions (point reads) - * - CosmosQueryRequestOptions (queries) - * - CosmosChangeFeedRequestOptions (change feed) - * - CosmosReadManyRequestOptions (read many) - * - CosmosClientBuilder (client-level default) + *

Does not extend {@link TestSuiteBase} to avoid {@code @BeforeSuite} shared container + * initialization which requires provisioned throughput (incompatible with serverless accounts). + * Uses {@link TestSuiteBase#createCollection(CosmosAsyncClient, String, CosmosContainerProperties)} + * as a static utility for serverless-safe container creation. * - * Requires a thin-client-enabled account configured via TestConfigurations. - * Run with test group "thinclient". + *

Run with test group "thinclient". */ -public class ThinClientReadConsistencyStrategyE2ETest { - private static final Logger logger = LoggerFactory.getLogger(ThinClientReadConsistencyStrategyE2ETest.class); +public class ReadConsistencyStrategyE2ETest { + private static final Logger logger = LoggerFactory.getLogger(ReadConsistencyStrategyE2ETest.class); private static final String THIN_CLIENT_ENDPOINT_INDICATOR = ":10250/"; private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + private static final long TIMEOUT = 60_000L; - private CosmosAsyncClient client; + private static final String GATEWAY_V1 = "GatewayV1"; + private static final String GATEWAY_V2 = "GatewayV2"; + + private CosmosAsyncClient gatewayV1Client; + private CosmosAsyncClient gatewayV2Client; private CosmosAsyncDatabase database; - private CosmosAsyncContainer container; + private CosmosAsyncContainer gatewayV1Container; + private CosmosAsyncContainer gatewayV2Container; private String databaseId; private String containerId; + private boolean gatewayV2Available; + + private String savedThinClientProperty; - @BeforeClass(groups = {"thinclient"}) + @BeforeClass(groups = {"thinclient"}, timeOut = TIMEOUT) public void beforeClass() { - client = createThinClientBuilder().buildAsyncClient(); + savedThinClientProperty = System.getProperty("COSMOS.THINCLIENT_ENABLED"); + System.setProperty("COSMOS.THINCLIENT_ENABLED", "true"); - databaseId = "readConsistencyStrategy-tc-" + UUID.randomUUID().toString().substring(0, 8); + databaseId = "readConsistencyStrategy-e2e-" + UUID.randomUUID().toString().substring(0, 8); containerId = "testcontainer"; - client.createDatabaseIfNotExists(databaseId).block(); - database = client.getDatabase(databaseId); + gatewayV1Client = createGatewayV1Builder().buildAsyncClient(); + + gatewayV1Client.createDatabaseIfNotExists(databaseId).block(); + database = gatewayV1Client.getDatabase(databaseId); CosmosContainerProperties containerProperties = new CosmosContainerProperties(containerId, "/pk"); - database.createContainerIfNotExists(containerProperties).block(); - container = database.getContainer(containerId); + TestSuiteBase.createCollection(gatewayV1Client, databaseId, containerProperties); + + gatewayV1Container = gatewayV1Client.getDatabase(databaseId).getContainer(containerId); - logger.info("Created test database {} and container {}", databaseId, containerId); + // Gateway V2 client — HTTP/2 enabled, thin client flag set + gatewayV2Client = createGatewayV2Builder().buildAsyncClient(); + gatewayV2Container = gatewayV2Client.getDatabase(databaseId).getContainer(containerId); + + // Check if thin client routing is actually available on this account + try { + String probeId = UUID.randomUUID().toString(); + ObjectNode probeDoc = createDocument(probeId); + gatewayV2Container.createItem(probeDoc, new PartitionKey(probeId), null).block(); + CosmosItemResponse probeResponse = + gatewayV2Container.readItem(probeId, new PartitionKey(probeId), ObjectNode.class).block(); + gatewayV2Available = probeResponse != null + && hasThinClientEndpoint(probeResponse.getDiagnostics()); + } catch (Exception e) { + gatewayV2Available = false; + logger.warn("Gateway V2 probe failed — V2 tests will run but without endpoint assertion", e); + } + + logger.info("Created E2E test resources: db={}, container={}, gatewayV2Available={}", + databaseId, containerId, gatewayV2Available); } @AfterClass(groups = {"thinclient"}, alwaysRun = true) public void afterClass() { + if (savedThinClientProperty != null) { + System.setProperty("COSMOS.THINCLIENT_ENABLED", savedThinClientProperty); + } else { + System.clearProperty("COSMOS.THINCLIENT_ENABLED"); + } if (database != null) { try { database.delete().block(); - logger.info("Deleted test database {}", databaseId); } catch (Exception e) { logger.warn("Failed to delete test database", e); } } - safeClose(client); + safeClose(gatewayV1Client); + safeClose(gatewayV2Client); } - // region ItemRequestOptions + @DataProvider(name = "transportModes") + public Object[][] transportModes() { + return new Object[][] { { GATEWAY_V1 }, { GATEWAY_V2 } }; + } - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_readItem_withLatestCommitted() { - String id = UUID.randomUUID().toString(); - createAndInsertDocument(id); + // region ItemRequestOptions — point reads + + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void readItem_withLatestCommitted(String mode) { + String id = seedDocument(mode); CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + containerFor(mode).readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); + assertSuccessfulRead(response); assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - assertThinClientEndpointUsed(response.getDiagnostics()); + assertEndpointForMode(mode, response.getDiagnostics()); } - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_readItem_withEventual() { - String id = UUID.randomUUID().toString(); - createAndInsertDocument(id); + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void readItem_withEventual(String mode) { + String id = seedDocument(mode); CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + containerFor(mode).readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); + assertSuccessfulRead(response); assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.EVENTUAL); - assertThinClientEndpointUsed(response.getDiagnostics()); + assertEndpointForMode(mode, response.getDiagnostics()); } - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_readItem_withSession() { - String id = UUID.randomUUID().toString(); - createAndInsertDocument(id); + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void readItem_withSession(String mode) { + String id = seedDocument(mode); CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() .setReadConsistencyStrategy(ReadConsistencyStrategy.SESSION); CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + containerFor(mode).readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); + assertSuccessfulRead(response); assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.SESSION); - assertThinClientEndpointUsed(response.getDiagnostics()); + assertEndpointForMode(mode, response.getDiagnostics()); } // endregion // region QueryRequestOptions - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_queryItems_withLatestCommitted() { - String id = UUID.randomUUID().toString(); - createAndInsertDocument(id); + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void queryItems_withLatestCommitted(String mode) { + String id = seedDocument(mode); CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() .setPartitionKey(new PartitionKey(id)) @@ -165,7 +196,7 @@ public void thinClient_queryItems_withLatestCommitted() { SqlQuerySpec querySpec = new SqlQuerySpec("SELECT * FROM c WHERE c.id=@id"); querySpec.setParameters(Arrays.asList(new SqlParameter("@id", id))); - FeedResponse response = container + FeedResponse response = containerFor(mode) .queryItems(querySpec, queryOptions, ObjectNode.class) .byPage() .blockFirst(); @@ -173,22 +204,22 @@ public void thinClient_queryItems_withLatestCommitted() { assertThat(response).isNotNull(); assertThat(response.getResults()).isNotNull(); assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - assertThinClientEndpointUsed(response.getCosmosDiagnostics()); + assertEndpointForMode(mode, response.getCosmosDiagnostics()); } // endregion - // region ReadAllItems (uses CosmosQueryRequestOptions) + // region ReadAllItems - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_readAllItems_withLatestCommitted() { + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void readAllItems_withLatestCommitted(String mode) { String pk = UUID.randomUUID().toString(); - createAndInsertDocument(UUID.randomUUID().toString(), pk); + seedDocument(mode, UUID.randomUUID().toString(), pk); CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - FeedResponse response = container + FeedResponse response = containerFor(mode) .readAllItems(new PartitionKey(pk), queryOptions, ObjectNode.class) .byPage() .blockFirst(); @@ -196,24 +227,24 @@ public void thinClient_readAllItems_withLatestCommitted() { assertThat(response).isNotNull(); assertThat(response.getResults()).isNotNull(); assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - assertThinClientEndpointUsed(response.getCosmosDiagnostics()); + assertEndpointForMode(mode, response.getCosmosDiagnostics()); } // endregion // region ChangeFeedRequestOptions - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_changeFeed_withLatestCommitted() { + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void changeFeed_withLatestCommitted(String mode) { String pkValue = UUID.randomUUID().toString(); - createAndInsertDocument(pkValue); + seedDocument(mode, pkValue, pkValue); CosmosChangeFeedRequestOptions cfOptions = CosmosChangeFeedRequestOptions .createForProcessingFromBeginning( FeedRange.forLogicalPartition(new PartitionKey(pkValue))) .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); - List> pages = container + List> pages = containerFor(mode) .queryChangeFeed(cfOptions, ObjectNode.class) .byPage() .collectList() @@ -224,20 +255,20 @@ public void thinClient_changeFeed_withLatestCommitted() { FeedResponse firstPage = pages.get(0); assertEffectiveReadConsistencyStrategy(firstPage.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - assertThinClientEndpointUsed(firstPage.getCosmosDiagnostics()); + assertEndpointForMode(mode, firstPage.getCosmosDiagnostics()); } // endregion // region ReadManyRequestOptions - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_readMany_withLatestCommitted() { + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void readMany_withLatestCommitted(String mode) { String pkValue = UUID.randomUUID().toString(); String id1 = UUID.randomUUID().toString(); String id2 = UUID.randomUUID().toString(); - createAndInsertDocument(id1, pkValue); - createAndInsertDocument(id2, pkValue); + seedDocument(mode, id1, pkValue); + seedDocument(mode, id2, pkValue); List identities = Arrays.asList( new CosmosItemIdentity(new PartitionKey(pkValue), id1), @@ -247,70 +278,64 @@ public void thinClient_readMany_withLatestCommitted() { .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); FeedResponse response = - container.readMany(identities, readManyOptions, ObjectNode.class).block(); + containerFor(mode).readMany(identities, readManyOptions, ObjectNode.class).block(); assertThat(response).isNotNull(); assertThat(response.getResults()).isNotNull(); assertThat(response.getResults().size()).isEqualTo(2); assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - assertThinClientEndpointUsed(response.getCosmosDiagnostics()); + assertEndpointForMode(mode, response.getCosmosDiagnostics()); } // endregion - // region Client-level readConsistencyStrategy + // region Client-level ReadConsistencyStrategy - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_clientLevel_latestCommitted_readItem() { + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void clientLevel_latestCommitted_readItem(String mode) { CosmosAsyncClient clientWithReadConsistencyStrategy = null; try { - clientWithReadConsistencyStrategy = createThinClientBuilder() + clientWithReadConsistencyStrategy = builderFor(mode) .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) .buildAsyncClient(); - CosmosAsyncContainer containerWithReadConsistencyStrategy = clientWithReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); + CosmosAsyncContainer targetContainer = clientWithReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); - createAndInsertDocument(containerWithReadConsistencyStrategy, id); + createAndInsertDocument(targetContainer, id); CosmosItemResponse response = - containerWithReadConsistencyStrategy.readItem(id, new PartitionKey(id), ObjectNode.class).block(); + targetContainer.readItem(id, new PartitionKey(id), ObjectNode.class).block(); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); + assertSuccessfulRead(response); assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - assertThinClientEndpointUsed(response.getDiagnostics()); + assertEndpointForMode(mode, response.getDiagnostics()); } finally { safeClose(clientWithReadConsistencyStrategy); } } - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_clientLevel_latestCommitted_query() { + // endregion + + // region Write operations — ReadConsistencyStrategy forced to DEFAULT + + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void writeItem_readConsistencyStrategyIgnored(String mode) { CosmosAsyncClient clientWithReadConsistencyStrategy = null; try { - clientWithReadConsistencyStrategy = createThinClientBuilder() + clientWithReadConsistencyStrategy = builderFor(mode) .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) .buildAsyncClient(); - CosmosAsyncContainer containerWithReadConsistencyStrategy = clientWithReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); + CosmosAsyncContainer targetContainer = clientWithReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); - createAndInsertDocument(containerWithReadConsistencyStrategy, id); - - CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() - .setPartitionKey(new PartitionKey(id)); - - SqlQuerySpec querySpec = new SqlQuerySpec("SELECT * FROM c WHERE c.id=@id"); - querySpec.setParameters(Arrays.asList(new SqlParameter("@id", id))); + ObjectNode doc = createDocument(id); - FeedResponse response = containerWithReadConsistencyStrategy - .queryItems(querySpec, queryOptions, ObjectNode.class) - .byPage() - .blockFirst(); + CosmosItemResponse response = + targetContainer.createItem(doc, new PartitionKey(id), null).block(); assertThat(response).isNotNull(); - assertThat(response.getResults()).isNotNull(); - assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - assertThinClientEndpointUsed(response.getCosmosDiagnostics()); + assertThat(response.getStatusCode()).isEqualTo(201); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.DEFAULT); } finally { safeClose(clientWithReadConsistencyStrategy); } @@ -318,140 +343,108 @@ public void thinClient_clientLevel_latestCommitted_query() { // endregion - // region Write operations — readConsistencyStrategy forced to DEFAULT - - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_writeItem_readConsistencyStrategyIgnored() { - CosmosAsyncClient clientWithReadConsistencyStrategy = null; - try { - clientWithReadConsistencyStrategy = createThinClientBuilder() - .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) - .buildAsyncClient(); - CosmosAsyncContainer containerWithReadConsistencyStrategy = clientWithReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); + // region Validation — GLOBAL_STRONG on Session account - String id = UUID.randomUUID().toString(); - ObjectNode doc = createDocument(id); + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void readItem_globalStrong_invalidAccount_throwsBadRequest(String mode) { + String id = seedDocument(mode); - CosmosItemResponse response = - containerWithReadConsistencyStrategy.createItem(doc, new PartitionKey(id), null).block(); + CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.GLOBAL_STRONG); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(201); - assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.DEFAULT); - } finally { - safeClose(clientWithReadConsistencyStrategy); + Throwable caughtError = null; + try { + containerFor(mode).readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + } catch (Throwable t) { + caughtError = t; } + + assertThat(caughtError) + .as("Expected BadRequestException for GLOBAL_STRONG on Session account") + .isNotNull() + .isInstanceOf(BadRequestException.class); + assertThat(caughtError.getMessage()).contains("read-consistency-strategy"); } // endregion - // region Both ConsistencyLevel and readConsistencyStrategy — readConsistencyStrategy wins + // region Contention — both ConsistencyLevel and ReadConsistencyStrategy set - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_bothConsistencyLevelAndReadConsistencyStrategy_readConsistencyStrategyWins() { + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void clientLevel_bothConsistencyLevelAndReadConsistencyStrategy_readConsistencyStrategyWins(String mode) { CosmosAsyncClient clientWithBoth = null; try { - clientWithBoth = createThinClientBuilder() + clientWithBoth = builderFor(mode) .consistencyLevel(ConsistencyLevel.EVENTUAL) .readConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED) .buildAsyncClient(); - CosmosAsyncContainer containerWithBoth = clientWithBoth.getDatabase(databaseId).getContainer(containerId); + CosmosAsyncContainer targetContainer = clientWithBoth.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); - createAndInsertDocument(containerWithBoth, id); + createAndInsertDocument(targetContainer, id); CosmosItemResponse response = - containerWithBoth.readItem(id, new PartitionKey(id), ObjectNode.class).block(); + targetContainer.readItem(id, new PartitionKey(id), ObjectNode.class).block(); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); + assertSuccessfulRead(response); assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - assertThinClientEndpointUsed(response.getDiagnostics()); + assertEndpointForMode(mode, response.getDiagnostics()); } finally { safeClose(clientWithBoth); } } - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_requestLevel_bothClAndReadConsistencyStrategy_readConsistencyStrategyWins() { - // Request-level contention: options set both ConsistencyLevel and readConsistencyStrategy. - // readConsistencyStrategy should win — proxy must not reject with dual-header error. - String id = UUID.randomUUID().toString(); - createAndInsertDocument(id); + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void requestLevel_bothConsistencyLevelAndReadConsistencyStrategy_readConsistencyStrategyWins(String mode) { + String id = seedDocument(mode); CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() .setConsistencyLevel(ConsistencyLevel.EVENTUAL) .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); CosmosItemResponse response = - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + containerFor(mode).readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); + assertSuccessfulRead(response); assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - assertThinClientEndpointUsed(response.getDiagnostics()); + assertEndpointForMode(mode, response.getDiagnostics()); } - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_requestLevelReadConsistencyStrategy_overridesClientLevelReadConsistencyStrategy() { - // Request-level readConsistencyStrategy should override client-level readConsistencyStrategy. + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void requestLevelReadConsistencyStrategy_overridesClientLevelReadConsistencyStrategy(String mode) { CosmosAsyncClient clientWithClientReadConsistencyStrategy = null; try { - clientWithClientReadConsistencyStrategy = createThinClientBuilder() + clientWithClientReadConsistencyStrategy = builderFor(mode) .readConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL) .buildAsyncClient(); - CosmosAsyncContainer containerWithReadConsistencyStrategy = clientWithClientReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); + CosmosAsyncContainer targetContainer = clientWithClientReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); String id = UUID.randomUUID().toString(); - createAndInsertDocument(containerWithReadConsistencyStrategy, id); + createAndInsertDocument(targetContainer, id); CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); CosmosItemResponse response = - containerWithReadConsistencyStrategy.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); + targetContainer.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); + assertSuccessfulRead(response); assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - assertThinClientEndpointUsed(response.getDiagnostics()); + assertEndpointForMode(mode, response.getDiagnostics()); } finally { safeClose(clientWithClientReadConsistencyStrategy); } } - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_globalStrong_onSessionAccount_throwsBadRequest() { - String id = UUID.randomUUID().toString(); - createAndInsertDocument(id); - - CosmosItemRequestOptions readOptions = new CosmosItemRequestOptions() - .setReadConsistencyStrategy(ReadConsistencyStrategy.GLOBAL_STRONG); - - Throwable caughtError = null; - try { - container.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - } catch (Throwable t) { - caughtError = t; - } - - assertThat(caughtError) - .as("Expected BadRequestException for GLOBAL_STRONG on Session account") - .isNotNull() - .isInstanceOf(BadRequestException.class); - assertThat(caughtError.getMessage()).contains("read-consistency-strategy"); - logger.info("Expected BadRequestException for GLOBAL_STRONG: {}", caughtError.getMessage()); - } - // endregion - // region Operation policy (dynamic request options) — readConsistencyStrategy set via CosmosOperationPolicy + // region Operation policy - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_operationPolicy_setsReadConsistencyStrategy() { + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void operationPolicy_setsReadConsistencyStrategy(String mode) { CosmosAsyncClient policyClient = null; try { - policyClient = createThinClientBuilder() + policyClient = builderFor(mode) .addOperationPolicy(cosmosOperationDetails -> { CosmosRequestOptions overrides = new CosmosRequestOptions() .setReadConsistencyStrategy(ReadConsistencyStrategy.LATEST_COMMITTED); @@ -466,20 +459,19 @@ public void thinClient_operationPolicy_setsReadConsistencyStrategy() { CosmosItemResponse response = policyContainer.readItem(id, new PartitionKey(id), ObjectNode.class).block(); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); + assertSuccessfulRead(response); assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.LATEST_COMMITTED); - assertThinClientEndpointUsed(response.getDiagnostics()); + assertEndpointForMode(mode, response.getDiagnostics()); } finally { safeClose(policyClient); } } - @Test(groups = {"thinclient"}, retryAnalyzer = FlakyTestRetryAnalyzer.class) - public void thinClient_operationPolicy_readConsistencyStrategyOverridesRequestLevel() { + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void operationPolicy_readConsistencyStrategyOverridesRequestLevel(String mode) { CosmosAsyncClient policyClient = null; try { - policyClient = createThinClientBuilder() + policyClient = builderFor(mode) .addOperationPolicy(cosmosOperationDetails -> { CosmosRequestOptions overrides = new CosmosRequestOptions() .setReadConsistencyStrategy(ReadConsistencyStrategy.EVENTUAL); @@ -497,10 +489,9 @@ public void thinClient_operationPolicy_readConsistencyStrategyOverridesRequestLe CosmosItemResponse response = policyContainer.readItem(id, new PartitionKey(id), readOptions, ObjectNode.class).block(); - assertThat(response).isNotNull(); - assertThat(response.getStatusCode()).isEqualTo(200); + assertSuccessfulRead(response); assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.EVENTUAL); - assertThinClientEndpointUsed(response.getDiagnostics()); + assertEndpointForMode(mode, response.getDiagnostics()); } finally { safeClose(policyClient); } @@ -508,9 +499,9 @@ public void thinClient_operationPolicy_readConsistencyStrategyOverridesRequestLe // endregion - // region Helpers + // region Helpers — builders - private CosmosClientBuilder createThinClientBuilder() { + private static CosmosClientBuilder createGatewayV1Builder() { return new CosmosClientBuilder() .endpoint(TestConfigurations.HOST) .key(TestConfigurations.MASTER_KEY) @@ -518,6 +509,33 @@ private CosmosClientBuilder createThinClientBuilder() { .consistencyLevel(ConsistencyLevel.SESSION); } + private static CosmosClientBuilder createGatewayV2Builder() { + GatewayConnectionConfig gwConfig = new GatewayConnectionConfig(); + gwConfig.setHttp2ConnectionConfig(new Http2ConnectionConfig().setEnabled(true)); + + return new CosmosClientBuilder() + .endpoint(TestConfigurations.HOST) + .key(TestConfigurations.MASTER_KEY) + .gatewayMode(gwConfig) + .consistencyLevel(ConsistencyLevel.SESSION); + } + + private CosmosClientBuilder builderFor(String mode) { + return isGatewayV2(mode) ? createGatewayV2Builder() : createGatewayV1Builder(); + } + + private CosmosAsyncContainer containerFor(String mode) { + return isGatewayV2(mode) ? gatewayV2Container : gatewayV1Container; + } + + private static boolean isGatewayV2(String mode) { + return GATEWAY_V2.equals(mode); + } + + // endregion + + // region Helpers — documents + private ObjectNode createDocument(String id) { return createDocument(id, id); } @@ -529,13 +547,15 @@ private ObjectNode createDocument(String id, String pk) { return doc; } - private void createAndInsertDocument(String id) { - createAndInsertDocument(id, id); + private String seedDocument(String mode) { + String id = UUID.randomUUID().toString(); + seedDocument(mode, id, id); + return id; } - private void createAndInsertDocument(String id, String pk) { + private void seedDocument(String mode, String id, String pk) { ObjectNode doc = createDocument(id, pk); - container.createItem(doc, new PartitionKey(pk), null).block(); + containerFor(mode).createItem(doc, new PartitionKey(pk), null).block(); } private void createAndInsertDocument(CosmosAsyncContainer targetContainer, String id) { @@ -543,6 +563,15 @@ private void createAndInsertDocument(CosmosAsyncContainer targetContainer, Strin targetContainer.createItem(doc, new PartitionKey(id), null).block(); } + // endregion + + // region Helpers — assertions + + private static void assertSuccessfulRead(CosmosItemResponse response) { + assertThat(response).isNotNull(); + assertThat(response.getStatusCode()).isEqualTo(200); + } + private static void assertEffectiveReadConsistencyStrategy(CosmosDiagnostics diagnostics, ReadConsistencyStrategy expected) { assertThat(diagnostics).isNotNull(); assertThat(diagnostics.getDiagnosticsContext()).isNotNull(); @@ -550,22 +579,28 @@ private static void assertEffectiveReadConsistencyStrategy(CosmosDiagnostics dia .isEqualTo(expected); } - private static void assertThinClientEndpointUsed(CosmosDiagnostics diagnostics) { - assertThat(diagnostics).isNotNull(); - CosmosDiagnosticsContext ctx = diagnostics.getDiagnosticsContext(); - assertThat(ctx).isNotNull(); - - Collection requests = ctx.getRequestInfo(); - assertThat(requests).isNotNull(); - assertThat(requests.size()).isPositive(); + private void assertEndpointForMode(String mode, CosmosDiagnostics diagnostics) { + if (isGatewayV2(mode) && gatewayV2Available) { + assertThat(hasThinClientEndpoint(diagnostics)) + .as("Expected at least one request to use thin client endpoint (:10250/)") + .isTrue(); + } + } + private static boolean hasThinClientEndpoint(CosmosDiagnostics diagnostics) { + if (diagnostics == null || diagnostics.getDiagnosticsContext() == null) { + return false; + } + Collection requests = diagnostics.getDiagnosticsContext().getRequestInfo(); + if (requests == null) { + return false; + } for (CosmosDiagnosticsRequestInfo requestInfo : requests) { - logger.info("Endpoint: {}, RequestType: {}", requestInfo.getEndpoint(), requestInfo.getRequestType()); if (requestInfo.getEndpoint().contains(THIN_CLIENT_ENDPOINT_INDICATOR)) { - return; + return true; } } - org.assertj.core.api.Assertions.fail("Expected at least one request to use thin client endpoint (:10250/)"); + return false; } private static void safeClose(CosmosAsyncClient clientToClose) { From 3f21d1da89fcd1388a209aa12472902ac6ba4a79 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Mon, 27 Apr 2026 17:45:16 -0400 Subject: [PATCH 34/46] Move ReadConsistencyStrategy test files to com.azure.cosmos.rx package - Move ReadConsistencyStrategySpyWireTest and ReadConsistencyStrategyE2ETest to com.azure.cosmos.rx for access to TestSuiteBase protected utilities - Keep RntbdReadConsistencyStrategyHeaderTests in directconnectivity.rntbd (requires package-private RntbdToken/RntbdTokenType) - Fix imports for all moved files - E2E test uses TestSuiteBase.assertThinClientEndpointUsed via same-package access Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...tbdReadConsistencyStrategyHeaderTests.java | 2 +- .../ReadConsistencyStrategyE2ETest.java | 29 ++++++++++--------- .../ReadConsistencyStrategySpyWireTest.java | 22 ++++++-------- 3 files changed, 25 insertions(+), 28 deletions(-) rename sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/{ => rx}/ReadConsistencyStrategyE2ETest.java (97%) rename sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/{implementation => rx}/ReadConsistencyStrategySpyWireTest.java (97%) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java index 4102c4007049..b74af6567316 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java @@ -9,12 +9,12 @@ import com.azure.cosmos.implementation.HttpConstants; import com.azure.cosmos.implementation.ISessionContainer; import com.azure.cosmos.implementation.OperationType; +import com.azure.cosmos.implementation.PartitionKeyRange; import com.azure.cosmos.implementation.ResourceType; import com.azure.cosmos.implementation.RxDocumentServiceRequest; import com.azure.cosmos.implementation.RxGatewayStoreModel; import com.azure.cosmos.implementation.ThinClientStoreModel; import com.azure.cosmos.implementation.UserAgentContainer; -import com.azure.cosmos.implementation.PartitionKeyRange; import com.azure.cosmos.implementation.http.HttpClient; import com.azure.cosmos.implementation.http.HttpRequest; import io.netty.buffer.ByteBuf; diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/ReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategyE2ETest.java similarity index 97% rename from sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/ReadConsistencyStrategyE2ETest.java rename to sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategyE2ETest.java index 19697fbc5ae8..70ef277f917b 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/ReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategyE2ETest.java @@ -1,7 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos; - +package com.azure.cosmos.rx; + +import com.azure.cosmos.ConsistencyLevel; +import com.azure.cosmos.CosmosAsyncClient; +import com.azure.cosmos.CosmosAsyncContainer; +import com.azure.cosmos.CosmosAsyncDatabase; +import com.azure.cosmos.CosmosClientBuilder; +import com.azure.cosmos.CosmosDiagnostics; +import com.azure.cosmos.CosmosDiagnosticsContext; +import com.azure.cosmos.CosmosDiagnosticsRequestInfo; +import com.azure.cosmos.FlakyTestRetryAnalyzer; +import com.azure.cosmos.GatewayConnectionConfig; +import com.azure.cosmos.Http2ConnectionConfig; +import com.azure.cosmos.ReadConsistencyStrategy; import com.azure.cosmos.implementation.BadRequestException; import com.azure.cosmos.implementation.TestConfigurations; import com.azure.cosmos.models.CosmosChangeFeedRequestOptions; @@ -17,7 +29,6 @@ import com.azure.cosmos.models.PartitionKey; import com.azure.cosmos.models.SqlParameter; import com.azure.cosmos.models.SqlQuerySpec; -import com.azure.cosmos.rx.TestSuiteBase; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import org.slf4j.Logger; @@ -69,11 +80,8 @@ public class ReadConsistencyStrategyE2ETest { private String containerId; private boolean gatewayV2Available; - private String savedThinClientProperty; - @BeforeClass(groups = {"thinclient"}, timeOut = TIMEOUT) public void beforeClass() { - savedThinClientProperty = System.getProperty("COSMOS.THINCLIENT_ENABLED"); System.setProperty("COSMOS.THINCLIENT_ENABLED", "true"); databaseId = "readConsistencyStrategy-e2e-" + UUID.randomUUID().toString().substring(0, 8); @@ -113,11 +121,6 @@ public void beforeClass() { @AfterClass(groups = {"thinclient"}, alwaysRun = true) public void afterClass() { - if (savedThinClientProperty != null) { - System.setProperty("COSMOS.THINCLIENT_ENABLED", savedThinClientProperty); - } else { - System.clearProperty("COSMOS.THINCLIENT_ENABLED"); - } if (database != null) { try { database.delete().block(); @@ -581,9 +584,7 @@ private static void assertEffectiveReadConsistencyStrategy(CosmosDiagnostics dia private void assertEndpointForMode(String mode, CosmosDiagnostics diagnostics) { if (isGatewayV2(mode) && gatewayV2Available) { - assertThat(hasThinClientEndpoint(diagnostics)) - .as("Expected at least one request to use thin client endpoint (:10250/)") - .isTrue(); + TestSuiteBase.assertThinClientEndpointUsed(diagnostics); } } diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategySpyWireTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategySpyWireTest.java similarity index 97% rename from sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategySpyWireTest.java rename to sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategySpyWireTest.java index 78aa2046c049..7fc63d23feeb 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/ReadConsistencyStrategySpyWireTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategySpyWireTest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.cosmos.implementation; +package com.azure.cosmos.rx; import com.azure.cosmos.ConsistencyLevel; import com.azure.cosmos.CosmosAsyncClient; @@ -10,6 +10,14 @@ import com.azure.cosmos.GatewayConnectionConfig; import com.azure.cosmos.Http2ConnectionConfig; import com.azure.cosmos.ReadConsistencyStrategy; +import com.azure.cosmos.implementation.Configs; +import com.azure.cosmos.implementation.ConnectionPolicy; +import com.azure.cosmos.implementation.Document; +import com.azure.cosmos.implementation.HttpConstants; +import com.azure.cosmos.implementation.ImplementationBridgeHelpers; +import com.azure.cosmos.implementation.RequestOptions; +import com.azure.cosmos.implementation.SpyClientUnderTestFactory; +import com.azure.cosmos.implementation.TestConfigurations; import com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdConstants; import com.azure.cosmos.implementation.directconnectivity.rntbd.RntbdRequest; import com.azure.cosmos.implementation.http.HttpRequest; @@ -17,7 +25,6 @@ import com.azure.cosmos.models.CosmosContainerProperties; import com.azure.cosmos.models.CosmosItemRequestOptions; import com.azure.cosmos.models.PartitionKey; -import com.azure.cosmos.rx.TestSuiteBase; import com.fasterxml.jackson.databind.node.ObjectNode; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; @@ -77,12 +84,8 @@ private static ImplementationBridgeHelpers.CosmosItemRequestOptionsHelper.Cosmos private SpyClientUnderTestFactory.ClientUnderTest v2SpyClient; private boolean v2Available; - private String savedThinClientProperty; - @BeforeClass(groups = {"thinclient"}, timeOut = TIMEOUT) public void beforeClass() { - // Save and set thin client property - savedThinClientProperty = System.getProperty("COSMOS.THINCLIENT_ENABLED"); System.setProperty("COSMOS.THINCLIENT_ENABLED", "true"); cosmosClient = new CosmosClientBuilder() @@ -123,13 +126,6 @@ public void beforeClass() { @AfterClass(groups = {"thinclient"}, alwaysRun = true) public void afterClass() { - // Restore thin client property - if (savedThinClientProperty != null) { - System.setProperty("COSMOS.THINCLIENT_ENABLED", savedThinClientProperty); - } else { - System.clearProperty("COSMOS.THINCLIENT_ENABLED"); - } - if (database != null) { try { database.delete().block(); From 3db0af8d7c71aa7d84a43d828983b1af1e903ac3 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Mon, 27 Apr 2026 18:04:01 -0400 Subject: [PATCH 35/46] Remove v2Available/gatewayV2Available gates and probe logic - V2 routing is proven by :10250 endpoint assertion on each request, not by upfront probe - Set COSMOS.THINCLIENT_ENABLED in @BeforeClass without save/restore (CI handles it) - DataProvider always returns both V1 and V2 modes - Remove hasThinClientEndpoint helper from E2E (use TestSuiteBase.assertThinClientEndpointUsed) - Remove unused imports (CosmosDiagnosticsContext, CosmosDiagnosticsRequestInfo, Collection) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../rx/ReadConsistencyStrategyE2ETest.java | 40 +------------------ .../ReadConsistencyStrategySpyWireTest.java | 16 ++------ 2 files changed, 5 insertions(+), 51 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategyE2ETest.java index 70ef277f917b..18cb5eef9ec3 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategyE2ETest.java @@ -8,8 +8,6 @@ import com.azure.cosmos.CosmosAsyncDatabase; import com.azure.cosmos.CosmosClientBuilder; import com.azure.cosmos.CosmosDiagnostics; -import com.azure.cosmos.CosmosDiagnosticsContext; -import com.azure.cosmos.CosmosDiagnosticsRequestInfo; import com.azure.cosmos.FlakyTestRetryAnalyzer; import com.azure.cosmos.GatewayConnectionConfig; import com.azure.cosmos.Http2ConnectionConfig; @@ -39,7 +37,6 @@ import org.testng.annotations.Test; import java.util.Arrays; -import java.util.Collection; import java.util.List; import java.util.UUID; @@ -64,7 +61,6 @@ */ public class ReadConsistencyStrategyE2ETest { private static final Logger logger = LoggerFactory.getLogger(ReadConsistencyStrategyE2ETest.class); - private static final String THIN_CLIENT_ENDPOINT_INDICATOR = ":10250/"; private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); private static final long TIMEOUT = 60_000L; @@ -78,7 +74,6 @@ public class ReadConsistencyStrategyE2ETest { private CosmosAsyncContainer gatewayV2Container; private String databaseId; private String containerId; - private boolean gatewayV2Available; @BeforeClass(groups = {"thinclient"}, timeOut = TIMEOUT) public void beforeClass() { @@ -101,22 +96,7 @@ public void beforeClass() { gatewayV2Client = createGatewayV2Builder().buildAsyncClient(); gatewayV2Container = gatewayV2Client.getDatabase(databaseId).getContainer(containerId); - // Check if thin client routing is actually available on this account - try { - String probeId = UUID.randomUUID().toString(); - ObjectNode probeDoc = createDocument(probeId); - gatewayV2Container.createItem(probeDoc, new PartitionKey(probeId), null).block(); - CosmosItemResponse probeResponse = - gatewayV2Container.readItem(probeId, new PartitionKey(probeId), ObjectNode.class).block(); - gatewayV2Available = probeResponse != null - && hasThinClientEndpoint(probeResponse.getDiagnostics()); - } catch (Exception e) { - gatewayV2Available = false; - logger.warn("Gateway V2 probe failed — V2 tests will run but without endpoint assertion", e); - } - - logger.info("Created E2E test resources: db={}, container={}, gatewayV2Available={}", - databaseId, containerId, gatewayV2Available); + logger.info("Created E2E test resources: db={}, container={}", databaseId, containerId); } @AfterClass(groups = {"thinclient"}, alwaysRun = true) @@ -583,27 +563,11 @@ private static void assertEffectiveReadConsistencyStrategy(CosmosDiagnostics dia } private void assertEndpointForMode(String mode, CosmosDiagnostics diagnostics) { - if (isGatewayV2(mode) && gatewayV2Available) { + if (isGatewayV2(mode)) { TestSuiteBase.assertThinClientEndpointUsed(diagnostics); } } - private static boolean hasThinClientEndpoint(CosmosDiagnostics diagnostics) { - if (diagnostics == null || diagnostics.getDiagnosticsContext() == null) { - return false; - } - Collection requests = diagnostics.getDiagnosticsContext().getRequestInfo(); - if (requests == null) { - return false; - } - for (CosmosDiagnosticsRequestInfo requestInfo : requests) { - if (requestInfo.getEndpoint().contains(THIN_CLIENT_ENDPOINT_INDICATOR)) { - return true; - } - } - return false; - } - private static void safeClose(CosmosAsyncClient clientToClose) { if (clientToClose != null) { try { diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategySpyWireTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategySpyWireTest.java index 7fc63d23feeb..2116c3383d6f 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategySpyWireTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategySpyWireTest.java @@ -82,7 +82,6 @@ private static ImplementationBridgeHelpers.CosmosItemRequestOptionsHelper.Cosmos private SpyClientUnderTestFactory.ClientUnderTest v1SpyClient; private SpyClientUnderTestFactory.ClientUnderTest v2SpyClient; - private boolean v2Available; @BeforeClass(groups = {"thinclient"}, timeOut = TIMEOUT) public void beforeClass() { @@ -112,16 +111,10 @@ public void beforeClass() { // V1 spy — HTTP/1, no Http2ConnectionConfig → useThinClient = false v1SpyClient = createSpyClient(null, false); - // V2 spy — HTTP/2 enabled → useThinClient = true (if thin client locations exist) + // V2 spy — HTTP/2 enabled, thin client JVM flag set v2SpyClient = createSpyClient(null, true); - v2Available = v2SpyClient.useThinClient(); - if (!v2Available) { - logger.warn("Thin client read locations not available — V2 spy wire tests will be skipped"); - } - - logger.info("Created spy-wire test resources: db={}, container={}, v2Available={}", - databaseId, containerId, v2Available); + logger.info("Created spy-wire test resources: db={}, container={}", databaseId, containerId); } @AfterClass(groups = {"thinclient"}, alwaysRun = true) @@ -146,10 +139,7 @@ public void afterClass() { @DataProvider(name = "transportModes") public Object[][] transportModes() { - if (v2Available) { - return new Object[][] { { V1 }, { V2 } }; - } - return new Object[][] { { V1 } }; + return new Object[][] { { V1 }, { V2 } }; } // region No contention — single header set From f9865c549b04295ef8a82b7c16e1d1e7c5124f58 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Mon, 27 Apr 2026 18:08:29 -0400 Subject: [PATCH 36/46] Rename E2E and spy wire tests to call out gateway scope MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ReadConsistencyStrategyE2ETest → GatewayReadConsistencyStrategyE2ETest - ReadConsistencyStrategySpyWireTest → GatewayReadConsistencyStrategySpyWireTest Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...2ETest.java => GatewayReadConsistencyStrategyE2ETest.java} | 4 ++-- ...st.java => GatewayReadConsistencyStrategySpyWireTest.java} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/{ReadConsistencyStrategyE2ETest.java => GatewayReadConsistencyStrategyE2ETest.java} (99%) rename sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/{ReadConsistencyStrategySpyWireTest.java => GatewayReadConsistencyStrategySpyWireTest.java} (99%) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/GatewayReadConsistencyStrategyE2ETest.java similarity index 99% rename from sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategyE2ETest.java rename to sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/GatewayReadConsistencyStrategyE2ETest.java index 18cb5eef9ec3..37ad41730ba0 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/GatewayReadConsistencyStrategyE2ETest.java @@ -59,8 +59,8 @@ * *

Run with test group "thinclient". */ -public class ReadConsistencyStrategyE2ETest { - private static final Logger logger = LoggerFactory.getLogger(ReadConsistencyStrategyE2ETest.class); +public class GatewayReadConsistencyStrategyE2ETest { + private static final Logger logger = LoggerFactory.getLogger(GatewayReadConsistencyStrategyE2ETest.class); private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); private static final long TIMEOUT = 60_000L; diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategySpyWireTest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/GatewayReadConsistencyStrategySpyWireTest.java similarity index 99% rename from sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategySpyWireTest.java rename to sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/GatewayReadConsistencyStrategySpyWireTest.java index 2116c3383d6f..16b59d541a1e 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/ReadConsistencyStrategySpyWireTest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/GatewayReadConsistencyStrategySpyWireTest.java @@ -59,8 +59,8 @@ *

V2 tests are skipped when the test account does not have thin client read locations * (the spy client falls back to V1 silently — we detect this and skip rather than false-pass). */ -public class ReadConsistencyStrategySpyWireTest { - private static final Logger logger = LoggerFactory.getLogger(ReadConsistencyStrategySpyWireTest.class); +public class GatewayReadConsistencyStrategySpyWireTest { + private static final Logger logger = LoggerFactory.getLogger(GatewayReadConsistencyStrategySpyWireTest.class); private static ImplementationBridgeHelpers.CosmosItemRequestOptionsHelper.CosmosItemRequestOptionsAccessor getItemOptionsAccessor() { return ImplementationBridgeHelpers.CosmosItemRequestOptionsHelper.getCosmosItemRequestOptionsAccessor(); From b0ed2417b8f862286e072cfb3cfcc1cda64ef9f7 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Mon, 27 Apr 2026 18:13:01 -0400 Subject: [PATCH 37/46] Replace brute-force RNTBD byte scanners with RntbdRequest.decode in unit tests - RntbdReadConsistencyStrategyHeaderTests now uses RntbdRequest.decode() for all RNTBD frame assertions, matching the spy wire test approach - Eliminates false-positive risk from byte-pattern scanning in binary frames - Removes containsRntbdHeaderWithByte, containsRntbdHeaderId, containsRntbdHeaderWithAnyValue Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...tbdReadConsistencyStrategyHeaderTests.java | 163 ++++++------------ 1 file changed, 51 insertions(+), 112 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java index b74af6567316..4d6410fbee05 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java @@ -204,15 +204,11 @@ public void thinClient_wrapInHttpRequest_readConsistencyStrategyEncodedInRntbdFr storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); byte[] rntbdFrame = collectHttpBody(httpRequest); - ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); - try { - assertThat(containsRntbdHeaderWithByte(buffer, (short) 0x00F0, expectedByte)) - .as("RNTBD frame from wrapInHttpRequest should contain readConsistencyStrategy header 0x00F0=0x%02X for %s", - expectedByte, readConsistencyStrategyValue) - .isTrue(); - } finally { - buffer.release(); - } + RntbdRequest decoded = decodeRntbdFrame(rntbdFrame); + Byte rcsValue = decoded.getHeader(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); + assertThat(rcsValue) + .as("RNTBD frame should contain readConsistencyStrategy 0x%02X for %s", expectedByte, readConsistencyStrategyValue) + .isEqualTo(expectedByte); } @Test(groups = { "unit" }) @@ -226,14 +222,11 @@ public void thinClient_wrapInHttpRequest_noReadConsistencyStrategyHeader_noRntbd storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); byte[] rntbdFrame = collectHttpBody(httpRequest); - ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); - try { - assertThat(containsRntbdHeaderId(buffer, (short) 0x00F0)) - .as("RNTBD frame should NOT contain readConsistencyStrategy header when not set") - .isFalse(); - } finally { - buffer.release(); - } + RntbdRequest decoded = decodeRntbdFrame(rntbdFrame); + Byte rcsValue = decoded.getHeader(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); + assertThat(rcsValue) + .as("ReadConsistencyStrategy token should not be set when header is absent (0 = unset)") + .isEqualTo((byte) 0); } @Test(groups = { "unit" }) @@ -248,17 +241,15 @@ public void thinClient_wrapInHttpRequest_readConsistencyStrategyPresent_consiste storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); byte[] rntbdFrame = collectHttpBody(httpRequest); - ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); - try { - assertThat(containsRntbdHeaderWithByte(buffer, (short) 0x00F0, (byte) 0x03)) - .as("RNTBD frame should contain readConsistencyStrategy=LatestCommitted (0x03)") - .isTrue(); - assertThat(containsRntbdHeaderWithAnyValue(buffer, (short) 0x0010)) - .as("RNTBD frame should NOT contain ConsistencyLevel when readConsistencyStrategy is set") - .isFalse(); - } finally { - buffer.release(); - } + RntbdRequest decoded = decodeRntbdFrame(rntbdFrame); + Byte rcsValue = decoded.getHeader(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); + assertThat(rcsValue) + .as("ReadConsistencyStrategy should be LatestCommitted (0x03)") + .isEqualTo((byte) 0x03); + Byte clValue = decoded.getHeader(RntbdConstants.RntbdRequestHeader.ConsistencyLevel); + assertThat(clValue) + .as("ConsistencyLevel should not be set when ReadConsistencyStrategy is present (0 = unset)") + .isEqualTo((byte) 0); } // endregion @@ -288,17 +279,15 @@ public void thinClient_resolveAndWrap_bothClAndReadConsistencyStrategy_onlyReadC storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); byte[] rntbdFrame = collectHttpBody(httpRequest); - ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); - try { - assertThat(containsRntbdHeaderWithByte(buffer, (short) 0x00F0, (byte) 0x03)) - .as("readConsistencyStrategy=LatestCommitted (0x03) should survive in the RNTBD frame") - .isTrue(); - assertThat(containsRntbdHeaderWithAnyValue(buffer, (short) 0x0010)) - .as("ConsistencyLevel should be stripped — only readConsistencyStrategy survives on the wire") - .isFalse(); - } finally { - buffer.release(); - } + RntbdRequest decoded = decodeRntbdFrame(rntbdFrame); + Byte rcsValue = decoded.getHeader(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); + assertThat(rcsValue) + .as("readConsistencyStrategy=LatestCommitted (0x03) should survive in the RNTBD frame") + .isEqualTo((byte) 0x03); + Byte clValue = decoded.getHeader(RntbdConstants.RntbdRequestHeader.ConsistencyLevel); + assertThat(clValue) + .as("ConsistencyLevel should be stripped — only readConsistencyStrategy survives on the wire (0 = unset)") + .isEqualTo((byte) 0); } @Test(groups = { "unit" }) @@ -321,18 +310,15 @@ public void thinClient_resolveAndWrap_requestContextReadConsistencyStrategy_over storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); byte[] rntbdFrame = collectHttpBody(httpRequest); - ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); - try { - // Request-level LATEST_COMMITTED (0x03) should win over header-level Eventual - assertThat(containsRntbdHeaderWithByte(buffer, (short) 0x00F0, (byte) 0x03)) - .as("Request-level readConsistencyStrategy=LatestCommitted should override header-level readConsistencyStrategy=Eventual") - .isTrue(); - assertThat(containsRntbdHeaderWithAnyValue(buffer, (short) 0x0010)) - .as("ConsistencyLevel should be stripped") - .isFalse(); - } finally { - buffer.release(); - } + RntbdRequest decoded = decodeRntbdFrame(rntbdFrame); + Byte rcsValue = decoded.getHeader(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); + assertThat(rcsValue) + .as("Request-level readConsistencyStrategy=LatestCommitted should override header-level Eventual") + .isEqualTo((byte) 0x03); + Byte clValue = decoded.getHeader(RntbdConstants.RntbdRequestHeader.ConsistencyLevel); + assertThat(clValue) + .as("ConsistencyLevel should be stripped (0 = unset)") + .isEqualTo((byte) 0); } @Test(groups = { "unit" }) @@ -350,19 +336,15 @@ public void thinClient_resolveAndWrap_defaultReadConsistencyStrategy_consistency storeModel.wrapInHttpRequest(request, URI.create("https://test-proxy:10250/")); byte[] rntbdFrame = collectHttpBody(httpRequest); - ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); - try { - assertThat(containsRntbdHeaderId(buffer, (short) 0x00F0)) - .as("DEFAULT readConsistencyStrategy should not emit readConsistencyStrategy header") - .isFalse(); - // Session = byte 0x03 in RntbdConsistencyLevel enum - assertThat(containsRntbdHeaderWithByte(buffer, (short) 0x0010, - RntbdConstants.RntbdConsistencyLevel.Session.id())) - .as("ConsistencyLevel=Session should survive when readConsistencyStrategy is DEFAULT") - .isTrue(); - } finally { - buffer.release(); - } + RntbdRequest decoded = decodeRntbdFrame(rntbdFrame); + Byte rcsValue = decoded.getHeader(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy); + assertThat(rcsValue) + .as("DEFAULT readConsistencyStrategy should not be set (0 = unset)") + .isEqualTo((byte) 0); + Byte clValue = decoded.getHeader(RntbdConstants.RntbdRequestHeader.ConsistencyLevel); + assertThat(clValue) + .as("ConsistencyLevel=Session should survive when readConsistencyStrategy is DEFAULT") + .isEqualTo(RntbdConstants.RntbdConsistencyLevel.Session.id()); } @Test(groups = { "unit" }) @@ -437,55 +419,12 @@ private static void resolveEffectiveConsistencyHeaders(RxDocumentServiceRequest // region RNTBD frame helpers /** - * Scans encoded RNTBD bytes for a header with the given ID and Byte value. - * RNTBD Byte tokens are encoded as: [headerID: 2 bytes LE] [tokenType: 1 byte = 0x00 for Byte] [value: 1 byte] + * Decodes the RNTBD binary frame using the production decoder. + * Token presence/absence is determined by the actual RNTBD wire format. */ - private static boolean containsRntbdHeaderWithByte(ByteBuf buffer, short headerId, byte expectedValue) { - byte idLow = (byte) (headerId & 0xFF); - byte idHigh = (byte) ((headerId >> 8) & 0xFF); - - for (int i = 0; i < buffer.writerIndex() - 3; i++) { - if (buffer.getByte(i) == idLow - && buffer.getByte(i + 1) == idHigh - && buffer.getByte(i + 2) == 0x00 // RntbdTokenType.Byte - && buffer.getByte(i + 3) == expectedValue) { - return true; - } - } - return false; - } - - /** - * Scans encoded RNTBD bytes for a header ID presence (any token type). - */ - private static boolean containsRntbdHeaderId(ByteBuf buffer, short headerId) { - byte idLow = (byte) (headerId & 0xFF); - byte idHigh = (byte) ((headerId >> 8) & 0xFF); - - for (int i = 0; i < buffer.writerIndex() - 1; i++) { - if (buffer.getByte(i) == idLow && buffer.getByte(i + 1) == idHigh) { - return true; - } - } - return false; - } - - /** - * Checks if a Byte-type RNTBD header has any non-zero value set. - * ConsistencyLevel (0x0010) is Byte type — if not set, the token is not present. - */ - private static boolean containsRntbdHeaderWithAnyValue(ByteBuf buffer, short headerId) { - byte idLow = (byte) (headerId & 0xFF); - byte idHigh = (byte) ((headerId >> 8) & 0xFF); - - for (int i = 0; i < buffer.writerIndex() - 2; i++) { - if (buffer.getByte(i) == idLow - && buffer.getByte(i + 1) == idHigh - && buffer.getByte(i + 2) == 0x00) { // Byte token type - return true; - } - } - return false; + private static RntbdRequest decodeRntbdFrame(byte[] rntbdFrame) { + ByteBuf buffer = Unpooled.wrappedBuffer(rntbdFrame); + return RntbdRequest.decode(buffer); } // endregion From a81fbf35fa85f17f5ddd8bd6abaceb073233a8e6 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Mon, 27 Apr 2026 18:24:50 -0400 Subject: [PATCH 38/46] Refactoring --- .../com/azure/cosmos/implementation/RxGatewayStoreModel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java index cd6b9712cc12..52f7c6171339 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java @@ -1036,8 +1036,8 @@ private Mono resolvePartitionKeyRangeByPkRangeIdCore( /** * Determines if the effective consistency for this request is Session — needed by * {@link #applySessionToken} to decide whether to attach/remove session tokens. - * - * Pure read — no side-effects, no header mutation, no HashMap copy. + *

+ * Pure read — no side effects, no header mutation, no HashMap copy. * Resolution order: request-level readConsistencyStrategy > client-level readConsistencyStrategy * (header) > consistency-level header > account default. */ From 4584597952a03961d888ff12d5ddee9c363a30fd Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Mon, 27 Apr 2026 18:42:57 -0400 Subject: [PATCH 39/46] Improve ReadConsistencyStrategy javadoc for customer readability - Document precedence: RCS > ConsistencyLevel, request-level > client-level - Note write operations always use DEFAULT - List all connection mode support (Direct, Gateway, Gateway V2) - Tighten enum value descriptions - Remove internal details (HTTP header, RNTBD header) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../azure/cosmos/ReadConsistencyStrategy.java | 44 +++++++++++-------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java index d1cafdb6bca1..a9f4d0354b93 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java @@ -15,48 +15,56 @@ /** * Represents the read consistency strategies supported by the Azure Cosmos DB service. *

- * The requested read consistency strategy can be chosen independent of the consistency level - * provisioned for the database account. + * A {@code ReadConsistencyStrategy} (RCS) allows choosing the read consistency behavior independent + * of the default consistency level configured for the database account. It can be set at the client + * level via {@link CosmosClientBuilder#readConsistencyStrategy(ReadConsistencyStrategy)} or at + * the request level via request options (e.g., + * {@link com.azure.cosmos.models.CosmosItemRequestOptions#setReadConsistencyStrategy(ReadConsistencyStrategy)}). *

- * The ReadConsistencyStrategy setting will override whatever ConsistencyLevel is chosen - * in RequestOptions, CosmosClient or the default consistency level for an account unless - * ReadConsistencyStrategy `DEFAULT` is used. + * Precedence: When both {@link ConsistencyLevel} and RCS are set, RCS takes precedence + * and {@code ConsistencyLevel} is ignored. When RCS is set to {@link #DEFAULT}, the configured + * {@code ConsistencyLevel} (or the account default) applies normally. *

- * NOTE: The ReadConsistencyStrategy is supported in Direct mode (existing), Gateway V1 (compute - * gateway, HTTP header), and Gateway V2 (thin client proxy, RNTBD header). + * Request-level RCS overrides client-level RCS. + *

+ * RCS only applies to read operations on documents. Write operations always use {@link #DEFAULT} + * regardless of the configured strategy. + *

+ * Supported in all connection modes: Direct, Gateway, and thin client (Gateway V2). */ @Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING) public enum ReadConsistencyStrategy { /** - * Use the default read behavior for the consistency level applied to the operation, the client or the account + * Uses the default read behavior based on the {@link ConsistencyLevel} applied to the + * operation, the client, or the account. When this value is set, {@code ReadConsistencyStrategy} + * is effectively transparent. */ DEFAULT("Default"), /** - * Eventual Consistency guarantees that reads will return a subset of writes. All writes - * will be eventually be available for reads. + * Reads may return a subset of writes. All writes will eventually be available for reads. */ EVENTUAL("Eventual"), /** - * Session Consistency guarantees monotonic reads (you never read old data, then new, then old again), monotonic - * writes (writes are ordered) and read your writes (your writes are immediately visible to your reads) within - * any single session. + * Guarantees monotonic reads, monotonic writes, and read-your-writes within a single session. */ SESSION("Session"), /** - * Will read the latest committed version from the region in preferred order (which means the read region might - * have stale data) but this read strategy will return the latest committed version of that region + * Reads the latest committed version from the preferred read region. The region may have + * replication lag, but this strategy returns the most recent version that region has committed. */ LATEST_COMMITTED("LatestCommitted"), /** - * Will read the latest version - since replication with global strong consistency is synchronous - * this read consistency strategy ensures that the latest successfully written version across regions is returned. + * Reads the latest version across all regions. Because replication with global strong consistency + * is synchronous, this guarantees the most recently written version is returned. * - * NOTE: Only supported for single-master accounts with Strong consistency enabled as default consistency. + *

Only supported for single-master accounts with {@link ConsistencyLevel#STRONG} as the + * default consistency level. A {@code BadRequestException} is thrown at request time if used + * on an account that does not meet this requirement. */ GLOBAL_STRONG("GlobalStrong"); From b0f6d2b1dc13b1850d20ebdd63bbb749a1d9e1f1 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Mon, 27 Apr 2026 18:46:51 -0400 Subject: [PATCH 40/46] Refactoring --- .../com/azure/cosmos/ReadConsistencyStrategy.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java index a9f4d0354b93..5aae5d5690b5 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java @@ -15,22 +15,22 @@ /** * Represents the read consistency strategies supported by the Azure Cosmos DB service. *

- * A {@code ReadConsistencyStrategy} (RCS) allows choosing the read consistency behavior independent + * A {@code ReadConsistencyStrategy} allows choosing the read consistency behavior independent * of the default consistency level configured for the database account. It can be set at the client * level via {@link CosmosClientBuilder#readConsistencyStrategy(ReadConsistencyStrategy)} or at * the request level via request options (e.g., * {@link com.azure.cosmos.models.CosmosItemRequestOptions#setReadConsistencyStrategy(ReadConsistencyStrategy)}). *

- * Precedence: When both {@link ConsistencyLevel} and RCS are set, RCS takes precedence - * and {@code ConsistencyLevel} is ignored. When RCS is set to {@link #DEFAULT}, the configured + * Precedence: When both {@link ConsistencyLevel} and {@link ReadConsistencyStrategy} are set, ReadConsistencyStrategy takes precedence + * and {@code ConsistencyLevel} is ignored. When ReadConsistencyStrategy is set to {@link #DEFAULT}, the configured * {@code ConsistencyLevel} (or the account default) applies normally. *

- * Request-level RCS overrides client-level RCS. + * Request-level ReadConsistencyStrategy overrides client-level ReadConsistencyStrategy. *

* RCS only applies to read operations on documents. Write operations always use {@link #DEFAULT} * regardless of the configured strategy. *

- * Supported in all connection modes: Direct, Gateway, and thin client (Gateway V2). + * Supported in all connection modes: Direct, Gateway, and Gateway V2. */ @Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING) public enum ReadConsistencyStrategy { @@ -71,8 +71,8 @@ public enum ReadConsistencyStrategy { private static Map readConsistencyStrategyHashMap = new HashMap<>(); static { - for (ReadConsistencyStrategy readConsistencyStrategy : ReadConsistencyStrategy.values()) { - readConsistencyStrategyHashMap.put(readConsistencyStrategy.toString(), readConsistencyStrategy); + for (ReadConsistencyStrategy rcs : ReadConsistencyStrategy.values()) { + readConsistencyStrategyHashMap.put(rcs.toString(), rcs); } } From 0b7f7067ef7564f79ace75c1010adc0c5a35b02b Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Mon, 27 Apr 2026 19:45:15 -0400 Subject: [PATCH 41/46] Add Direct mode to unified E2E test for ReadConsistencyStrategy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add Direct connection mode as third transport in DataProvider - All 45 tests pass (15 scenarios × 3 modes: GatewayV1, GatewayV2, Direct) - Enables backend telemetry comparison across all three transports Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...GatewayReadConsistencyStrategyE2ETest.java | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/GatewayReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/GatewayReadConsistencyStrategyE2ETest.java index 37ad41730ba0..b25a78107621 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/GatewayReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/GatewayReadConsistencyStrategyE2ETest.java @@ -66,12 +66,15 @@ public class GatewayReadConsistencyStrategyE2ETest { private static final String GATEWAY_V1 = "GatewayV1"; private static final String GATEWAY_V2 = "GatewayV2"; + private static final String DIRECT = "Direct"; private CosmosAsyncClient gatewayV1Client; private CosmosAsyncClient gatewayV2Client; + private CosmosAsyncClient directClient; private CosmosAsyncDatabase database; private CosmosAsyncContainer gatewayV1Container; private CosmosAsyncContainer gatewayV2Container; + private CosmosAsyncContainer directContainer; private String databaseId; private String containerId; @@ -96,6 +99,10 @@ public void beforeClass() { gatewayV2Client = createGatewayV2Builder().buildAsyncClient(); gatewayV2Container = gatewayV2Client.getDatabase(databaseId).getContainer(containerId); + // Direct mode client + directClient = createDirectBuilder().buildAsyncClient(); + directContainer = directClient.getDatabase(databaseId).getContainer(containerId); + logger.info("Created E2E test resources: db={}, container={}", databaseId, containerId); } @@ -110,11 +117,12 @@ public void afterClass() { } safeClose(gatewayV1Client); safeClose(gatewayV2Client); + safeClose(directClient); } @DataProvider(name = "transportModes") public Object[][] transportModes() { - return new Object[][] { { GATEWAY_V1 }, { GATEWAY_V2 } }; + return new Object[][] { { GATEWAY_V1 }, { GATEWAY_V2 }, { DIRECT } }; } // region ItemRequestOptions — point reads @@ -503,12 +511,28 @@ private static CosmosClientBuilder createGatewayV2Builder() { .consistencyLevel(ConsistencyLevel.SESSION); } + private static CosmosClientBuilder createDirectBuilder() { + return new CosmosClientBuilder() + .endpoint(TestConfigurations.HOST) + .key(TestConfigurations.MASTER_KEY) + .directMode() + .consistencyLevel(ConsistencyLevel.SESSION); + } + private CosmosClientBuilder builderFor(String mode) { - return isGatewayV2(mode) ? createGatewayV2Builder() : createGatewayV1Builder(); + switch (mode) { + case GATEWAY_V2: return createGatewayV2Builder(); + case DIRECT: return createDirectBuilder(); + default: return createGatewayV1Builder(); + } } private CosmosAsyncContainer containerFor(String mode) { - return isGatewayV2(mode) ? gatewayV2Container : gatewayV1Container; + switch (mode) { + case GATEWAY_V2: return gatewayV2Container; + case DIRECT: return directContainer; + default: return gatewayV1Container; + } } private static boolean isGatewayV2(String mode) { From 3bbd63f3e8476df94aa66f94cb0dfa9f8073cf4e Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Tue, 28 Apr 2026 19:43:17 -0400 Subject: [PATCH 42/46] Address review: treat DEFAULT as transparent, add SESSION E2E tests - Fix isEffectiveSessionConsistency to treat RCS 'Default' as transparent (fall through to CL/account default instead of returning false) - Fix resolveEffectiveConsistencyHeaders to strip 'Default' sentinel header - Prevent 'Default' header from being written in query/changefeed paths (DocumentQueryExecutionContextBase, ChangeFeedQueryImpl) - Add warning log for unknown ReadConsistencyStrategy values in RNTBD switch - Add SESSION E2E tests: query, readAll, changeFeed, readMany, client-level Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...GatewayReadConsistencyStrategyE2ETest.java | 115 +++++++++++++++++- .../implementation/ChangeFeedQueryImpl.java | 18 ++- .../implementation/RxGatewayStoreModel.java | 6 +- .../rntbd/RntbdRequestHeaders.java | 6 + .../DocumentQueryExecutionContextBase.java | 18 ++- 5 files changed, 149 insertions(+), 14 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/GatewayReadConsistencyStrategyE2ETest.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/GatewayReadConsistencyStrategyE2ETest.java index b25a78107621..ac2eb8d6d261 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/GatewayReadConsistencyStrategyE2ETest.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/rx/GatewayReadConsistencyStrategyE2ETest.java @@ -198,6 +198,28 @@ public void queryItems_withLatestCommitted(String mode) { assertEndpointForMode(mode, response.getCosmosDiagnostics()); } + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void queryItems_withSession(String mode) { + String id = seedDocument(mode); + + CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() + .setPartitionKey(new PartitionKey(id)) + .setReadConsistencyStrategy(ReadConsistencyStrategy.SESSION); + + SqlQuerySpec querySpec = new SqlQuerySpec("SELECT * FROM c WHERE c.id=@id"); + querySpec.setParameters(Arrays.asList(new SqlParameter("@id", id))); + + FeedResponse response = containerFor(mode) + .queryItems(querySpec, queryOptions, ObjectNode.class) + .byPage() + .blockFirst(); + + assertThat(response).isNotNull(); + assertThat(response.getResults()).isNotNull(); + assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.SESSION); + assertEndpointForMode(mode, response.getCosmosDiagnostics()); + } + // endregion // region ReadAllItems @@ -221,6 +243,25 @@ public void readAllItems_withLatestCommitted(String mode) { assertEndpointForMode(mode, response.getCosmosDiagnostics()); } + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void readAllItems_withSession(String mode) { + String pk = UUID.randomUUID().toString(); + seedDocument(mode, UUID.randomUUID().toString(), pk); + + CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.SESSION); + + FeedResponse response = containerFor(mode) + .readAllItems(new PartitionKey(pk), queryOptions, ObjectNode.class) + .byPage() + .blockFirst(); + + assertThat(response).isNotNull(); + assertThat(response.getResults()).isNotNull(); + assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.SESSION); + assertEndpointForMode(mode, response.getCosmosDiagnostics()); + } + // endregion // region ChangeFeedRequestOptions @@ -249,6 +290,30 @@ public void changeFeed_withLatestCommitted(String mode) { assertEndpointForMode(mode, firstPage.getCosmosDiagnostics()); } + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void changeFeed_withSession(String mode) { + String pkValue = UUID.randomUUID().toString(); + seedDocument(mode, pkValue, pkValue); + + CosmosChangeFeedRequestOptions cfOptions = CosmosChangeFeedRequestOptions + .createForProcessingFromBeginning( + FeedRange.forLogicalPartition(new PartitionKey(pkValue))) + .setReadConsistencyStrategy(ReadConsistencyStrategy.SESSION); + + List> pages = containerFor(mode) + .queryChangeFeed(cfOptions, ObjectNode.class) + .byPage() + .collectList() + .block(); + + assertThat(pages).isNotNull(); + assertThat(pages.isEmpty()).isFalse(); + + FeedResponse firstPage = pages.get(0); + assertEffectiveReadConsistencyStrategy(firstPage.getCosmosDiagnostics(), ReadConsistencyStrategy.SESSION); + assertEndpointForMode(mode, firstPage.getCosmosDiagnostics()); + } + // endregion // region ReadManyRequestOptions @@ -278,6 +343,31 @@ public void readMany_withLatestCommitted(String mode) { assertEndpointForMode(mode, response.getCosmosDiagnostics()); } + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void readMany_withSession(String mode) { + String pkValue = UUID.randomUUID().toString(); + String id1 = UUID.randomUUID().toString(); + String id2 = UUID.randomUUID().toString(); + seedDocument(mode, id1, pkValue); + seedDocument(mode, id2, pkValue); + + List identities = Arrays.asList( + new CosmosItemIdentity(new PartitionKey(pkValue), id1), + new CosmosItemIdentity(new PartitionKey(pkValue), id2)); + + CosmosReadManyRequestOptions readManyOptions = new CosmosReadManyRequestOptions() + .setReadConsistencyStrategy(ReadConsistencyStrategy.SESSION); + + FeedResponse response = + containerFor(mode).readMany(identities, readManyOptions, ObjectNode.class).block(); + + assertThat(response).isNotNull(); + assertThat(response.getResults()).isNotNull(); + assertThat(response.getResults().size()).isEqualTo(2); + assertEffectiveReadConsistencyStrategy(response.getCosmosDiagnostics(), ReadConsistencyStrategy.SESSION); + assertEndpointForMode(mode, response.getCosmosDiagnostics()); + } + // endregion // region Client-level ReadConsistencyStrategy @@ -305,9 +395,32 @@ public void clientLevel_latestCommitted_readItem(String mode) { } } + @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) + public void clientLevel_session_readItem(String mode) { + CosmosAsyncClient clientWithReadConsistencyStrategy = null; + try { + clientWithReadConsistencyStrategy = builderFor(mode) + .readConsistencyStrategy(ReadConsistencyStrategy.SESSION) + .buildAsyncClient(); + CosmosAsyncContainer targetContainer = clientWithReadConsistencyStrategy.getDatabase(databaseId).getContainer(containerId); + + String id = UUID.randomUUID().toString(); + createAndInsertDocument(targetContainer, id); + + CosmosItemResponse response = + targetContainer.readItem(id, new PartitionKey(id), ObjectNode.class).block(); + + assertSuccessfulRead(response); + assertEffectiveReadConsistencyStrategy(response.getDiagnostics(), ReadConsistencyStrategy.SESSION); + assertEndpointForMode(mode, response.getDiagnostics()); + } finally { + safeClose(clientWithReadConsistencyStrategy); + } + } + // endregion - // region Write operations — ReadConsistencyStrategy forced to DEFAULT + // region Write operations— ReadConsistencyStrategy forced to DEFAULT @Test(groups = {"thinclient"}, timeOut = TIMEOUT, dataProvider = "transportModes", retryAnalyzer = FlakyTestRetryAnalyzer.class) public void writeItem_readConsistencyStrategyIgnored(String mode) { diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ChangeFeedQueryImpl.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ChangeFeedQueryImpl.java index 9e3ffc4efab5..ce2f4961fb1b 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ChangeFeedQueryImpl.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/ChangeFeedQueryImpl.java @@ -146,20 +146,26 @@ private RxDocumentServiceRequest createDocumentServiceRequest() { if (this.options.getReadConsistencyStrategy() != null) { - String readConsistencyStrategyName = options.getReadConsistencyStrategy().toString(); this.client.validateReadConsistencyStrategy(options.getReadConsistencyStrategy()); - headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, readConsistencyStrategyName); + + if (this.options.getReadConsistencyStrategy() != ReadConsistencyStrategy.DEFAULT) { + headers.put( + HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, + options.getReadConsistencyStrategy().toString()); + } consistencyLevelOverrideApplicable = this.options.getReadConsistencyStrategy() == ReadConsistencyStrategy.DEFAULT; } if (consistencyLevelOverrideApplicable && this.client.getReadConsistencyStrategy() != null) { - String readConsistencyStrategyName = this.client.getReadConsistencyStrategy().toString(); this.client.validateReadConsistencyStrategy(this.client.getReadConsistencyStrategy()); - headers.put( - HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, - readConsistencyStrategyName); + + if (this.client.getReadConsistencyStrategy() != ReadConsistencyStrategy.DEFAULT) { + headers.put( + HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, + this.client.getReadConsistencyStrategy().toString()); + } consistencyLevelOverrideApplicable = this.client.getReadConsistencyStrategy() == ReadConsistencyStrategy.DEFAULT; diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java index 69e3eb577903..f5eee2100de0 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java @@ -376,6 +376,9 @@ public static void resolveEffectiveConsistencyHeaders( headers.remove(HttpConstants.HttpHeaders.CONSISTENCY_LEVEL); // Ensure the readConsistencyStrategy header is set (requestContext-level may not have been written to headers yet) headers.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, effectiveReadConsistencyStrategy.toString()); + } else if (effectiveReadConsistencyStrategy == ReadConsistencyStrategy.DEFAULT) { + // DEFAULT is transparent — remove the sentinel header, let ConsistencyLevel govern + headers.remove(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY); } } @@ -1051,7 +1054,8 @@ private boolean isEffectiveSessionConsistency(RxDocumentServiceRequest request) // Client-level readConsistencyStrategy from header String rcsHeader = request.getHeaders().get(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY); - if (!Strings.isNullOrEmpty(rcsHeader)) { + if (!Strings.isNullOrEmpty(rcsHeader) + && !ReadConsistencyStrategy.DEFAULT.toString().equals(rcsHeader)) { return ReadConsistencyStrategy.SESSION.toString().equals(rcsHeader); } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java index 66eee58ee81d..444d3b3cfe93 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java @@ -18,6 +18,8 @@ import com.azure.cosmos.implementation.RxDocumentServiceRequest; import com.azure.cosmos.implementation.apachecommons.lang.EnumUtils; import com.azure.cosmos.implementation.apachecommons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.azure.cosmos.models.IndexingDirective; import com.azure.cosmos.models.PriorityLevel; import com.fasterxml.jackson.annotation.JsonFilter; @@ -48,6 +50,7 @@ @JsonFilter("RntbdToken") final class RntbdRequestHeaders extends RntbdTokenStream { + private static final Logger logger = LoggerFactory.getLogger(RntbdRequestHeaders.class); private static ImplementationBridgeHelpers.PriorityLevelHelper.PriorityLevelAccessor priorityLevelAccessor() { return ImplementationBridgeHelpers.PriorityLevelHelper.getPriorityLevelAccessor(); @@ -851,6 +854,9 @@ private void addReadConsistencyStrategy(final Map headers) { this.getReadConsistencyStrategy().setValue(RntbdConstants.RntbdReadConsistencyStrategy.GlobalStrong.id()); break; default: + if (!"Default".equals(value)) { + logger.warn("Unknown ReadConsistencyStrategy value '{}' — not encoded in RNTBD frame", value); + } break; } } diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/query/DocumentQueryExecutionContextBase.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/query/DocumentQueryExecutionContextBase.java index a6bd918559cf..4e8d26112316 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/query/DocumentQueryExecutionContextBase.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/query/DocumentQueryExecutionContextBase.java @@ -300,20 +300,26 @@ public Map createCommonHeadersAsync(CosmosQueryRequestOptions co if (cosmosQueryRequestOptions.getReadConsistencyStrategy() != null) { - String readConsistencyStrategyName = cosmosQueryRequestOptions.getReadConsistencyStrategy().toString(); this.client.validateReadConsistencyStrategy(cosmosQueryRequestOptions.getReadConsistencyStrategy()); - requestHeaders.put(HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, readConsistencyStrategyName); + + if (cosmosQueryRequestOptions.getReadConsistencyStrategy() != ReadConsistencyStrategy.DEFAULT) { + requestHeaders.put( + HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, + cosmosQueryRequestOptions.getReadConsistencyStrategy().toString()); + } consistencyLevelOverrideApplicable = cosmosQueryRequestOptions.getReadConsistencyStrategy() == ReadConsistencyStrategy.DEFAULT; } if (consistencyLevelOverrideApplicable && this.client.getReadConsistencyStrategy() != null) { - String readConsistencyStrategyName = this.client.getReadConsistencyStrategy().toString(); this.client.validateReadConsistencyStrategy(this.client.getReadConsistencyStrategy()); - requestHeaders.put( - HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, - readConsistencyStrategyName); + + if (this.client.getReadConsistencyStrategy() != ReadConsistencyStrategy.DEFAULT) { + requestHeaders.put( + HttpConstants.HttpHeaders.READ_CONSISTENCY_STRATEGY, + this.client.getReadConsistencyStrategy().toString()); + } consistencyLevelOverrideApplicable = this.client.getReadConsistencyStrategy() == ReadConsistencyStrategy.DEFAULT; From 8e5013ed162c9fdb4c216af962e7a898785b940c Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Wed, 29 Apr 2026 11:40:45 -0400 Subject: [PATCH 43/46] Refactoring --- .../implementation/directconnectivity/rntbd/RntbdConstants.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java index 34bdde18c453..ca5ed4432212 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdConstants.java @@ -618,7 +618,7 @@ public enum RntbdRequestHeader implements RntbdHeader { ThroughputBucket((short)0x00DB, RntbdTokenType.Byte, false), PopulateQueryAdvice((short) 0x00DA, RntbdTokenType.Byte, false), HubRegionProcessingOnly((short)0x00EF, RntbdTokenType.Byte , false), - ReadConsistencyStrategy((short)0x00F0, RntbdTokenType.Byte, false); + ReadConsistencyStrategy((short)0x00FE, RntbdTokenType.Byte, false); public static final List thinClientHeadersInOrderList = Arrays.asList( EffectivePartitionKey, From f0dfc5ccd7bd6c575b89c3aa5726dbea768acc55 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Wed, 29 Apr 2026 11:49:54 -0400 Subject: [PATCH 44/46] Refactoring --- .../directconnectivity/rntbd/RntbdRequestHeaders.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java index 444d3b3cfe93..96a472c45763 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestHeaders.java @@ -855,7 +855,8 @@ private void addReadConsistencyStrategy(final Map headers) { break; default: if (!"Default".equals(value)) { - logger.warn("Unknown ReadConsistencyStrategy value '{}' — not encoded in RNTBD frame", value); + throw new IllegalArgumentException( + "Unknown ReadConsistencyStrategy value '" + value + "' — cannot encode in RNTBD frame"); } break; } From 6fcefa012d87d390ddca0fd457ac80c5a10fe183 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Wed, 29 Apr 2026 13:00:55 -0400 Subject: [PATCH 45/46] Fixing tests. --- .../rntbd/RntbdReadConsistencyStrategyHeaderTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java index 4d6410fbee05..beef7d9318d3 100644 --- a/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java +++ b/sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdReadConsistencyStrategyHeaderTests.java @@ -101,7 +101,7 @@ public Object[][] readConsistencyStrategyStringToRntbdByteValues() { @Test(groups = { "unit" }) public void readConsistencyStrategyTokenMetadata() { assertThat(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy.id()) - .isEqualTo((short) 0x00F0); + .isEqualTo((short) 0x00FE); assertThat(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy.type()) .isEqualTo(RntbdTokenType.Byte); assertThat(RntbdConstants.RntbdRequestHeader.ReadConsistencyStrategy.isRequired()) From af4b7c528d3757d8cf642165a9bd679d222a0795 Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Wed, 29 Apr 2026 13:33:37 -0400 Subject: [PATCH 46/46] Revert ReadConsistencyStrategy.java javadoc to match Azure/main Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../azure/cosmos/ReadConsistencyStrategy.java | 43 ++++++++----------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java index 5aae5d5690b5..f8e094a37164 100644 --- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java +++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/ReadConsistencyStrategy.java @@ -15,56 +15,47 @@ /** * Represents the read consistency strategies supported by the Azure Cosmos DB service. *

- * A {@code ReadConsistencyStrategy} allows choosing the read consistency behavior independent - * of the default consistency level configured for the database account. It can be set at the client - * level via {@link CosmosClientBuilder#readConsistencyStrategy(ReadConsistencyStrategy)} or at - * the request level via request options (e.g., - * {@link com.azure.cosmos.models.CosmosItemRequestOptions#setReadConsistencyStrategy(ReadConsistencyStrategy)}). + * The requested read consistency strategy can be chosen independent of the consistency level + * provisioned for the database account. *

- * Precedence: When both {@link ConsistencyLevel} and {@link ReadConsistencyStrategy} are set, ReadConsistencyStrategy takes precedence - * and {@code ConsistencyLevel} is ignored. When ReadConsistencyStrategy is set to {@link #DEFAULT}, the configured - * {@code ConsistencyLevel} (or the account default) applies normally. + * The ReadConsistencyStrategy setting will override whatever ConsistencyLevel is chosen + * in RequestOptions, CosmosClient or the default consistency level for an account unless + * ReadConsistencyStrategy `DEFAULT` is used. *

- * Request-level ReadConsistencyStrategy overrides client-level ReadConsistencyStrategy. - *

- * RCS only applies to read operations on documents. Write operations always use {@link #DEFAULT} - * regardless of the configured strategy. - *

- * Supported in all connection modes: Direct, Gateway, and Gateway V2. + * NOTE: The ReadConsistencyStrategy is currently only working when using direct mode */ @Beta(value = Beta.SinceVersion.V4_69_0, warningText = Beta.PREVIEW_SUBJECT_TO_CHANGE_WARNING) public enum ReadConsistencyStrategy { /** - * Uses the default read behavior based on the {@link ConsistencyLevel} applied to the - * operation, the client, or the account. When this value is set, {@code ReadConsistencyStrategy} - * is effectively transparent. + * Use the default read behavior for the consistency level applied to the operation, the client or the account */ DEFAULT("Default"), /** - * Reads may return a subset of writes. All writes will eventually be available for reads. + * Eventual Consistency guarantees that reads will return a subset of writes. All writes + * will be eventually be available for reads. */ EVENTUAL("Eventual"), /** - * Guarantees monotonic reads, monotonic writes, and read-your-writes within a single session. + * Session Consistency guarantees monotonic reads (you never read old data, then new, then old again), monotonic + * writes (writes are ordered) and read your writes (your writes are immediately visible to your reads) within + * any single session. */ SESSION("Session"), /** - * Reads the latest committed version from the preferred read region. The region may have - * replication lag, but this strategy returns the most recent version that region has committed. + * Will read the latest committed version from the region in preferred order (which means the read region might + * have stale data) but this read strategy will return the latest committed version of that region */ LATEST_COMMITTED("LatestCommitted"), /** - * Reads the latest version across all regions. Because replication with global strong consistency - * is synchronous, this guarantees the most recently written version is returned. + * Will read the latest version - since replication with global strong consistency is synchronous + * this read consistency strategy ensures that the latest successfully written version across regions is returned. * - *

Only supported for single-master accounts with {@link ConsistencyLevel#STRONG} as the - * default consistency level. A {@code BadRequestException} is thrown at request time if used - * on an account that does not meet this requirement. + * NOTE: Only supported for single-master accounts with Strong consistency enabled as default consistency. */ GLOBAL_STRONG("GlobalStrong");