Skip to content

Commit

Permalink
PR comments - remove unsupported tests and scope client
Browse files Browse the repository at this point in the history
  • Loading branch information
Maya-Painter committed Jun 22, 2023
1 parent 5a3f53c commit 9b396f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,14 @@ private async Task ValidateConsistencyLevel(DocumentClient client)
[TestMethod]
public void ValidateJsonSerializationFormatGateway()
{
var client = TestCommon.CreateClient(true);
using var client = TestCommon.CreateClient(true);
ValidateJsonSerializationFormat(client);
}

[TestMethod]
public void ValidateJsonSerializationFormatRntbd()
{
var client = TestCommon.CreateClient(false, Protocol.Tcp);
using var client = TestCommon.CreateClient(false, Protocol.Tcp);
ValidateJsonSerializationFormat(client);
}

Expand Down Expand Up @@ -309,24 +309,17 @@ private void ValidateJsonSerializationFormatQuery(DocumentClient client, Documen
[TestMethod]
public void ValidateSupportedSerializationFormatsGateway()
{
DocumentClient client = TestCommon.CreateClient(true);
using var client = TestCommon.CreateClient(true);
this.ValidateSupportedSerializationFormats(client, true);
}

[TestMethod]
public void ValidateSupportedSerializationFormatsRntbd()
{
DocumentClient client = TestCommon.CreateClient(false, Protocol.Tcp);
using var client = TestCommon.CreateClient(false, Protocol.Tcp);
this.ValidateSupportedSerializationFormats(client, false);
}

[TestMethod]
public void ValidateSupportedSerializationFormatsHttps()
{
DocumentClient client = TestCommon.CreateClient(false, Protocol.Https);
this.ValidateSupportedSerializationFormats(client, true);
}

private void ValidateSupportedSerializationFormats(DocumentClient client, bool isHttps)
{
DocumentCollection collection = TestCommon.CreateOrGetDocumentCollection(client);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,11 @@ public class BinaryEncodingOverTheWireTests
ConfigurationManager.AppSettings["GatewayEndpoint"],
ConfigurationManager.AppSettings["MasterKey"],
new CosmosClientOptions() { ConnectionMode = ConnectionMode.Gateway });
private static readonly CosmosClient DirectHttpsClient = new CosmosClient(
ConfigurationManager.AppSettings["GatewayEndpoint"],
ConfigurationManager.AppSettings["MasterKey"],
new CosmosClientOptions() { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Documents.Client.Protocol.Https });
private static readonly CosmosClient RntbdClient = new CosmosClient(
ConfigurationManager.AppSettings["GatewayEndpoint"],
ConfigurationManager.AppSettings["MasterKey"],
new CosmosClientOptions() { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Documents.Client.Protocol.Tcp });
private static readonly CosmosClient[] Clients = new CosmosClient[] { GatewayClient, DirectHttpsClient, RntbdClient };
private static readonly CosmosClient[] Clients = new CosmosClient[] { GatewayClient, RntbdClient };
private static readonly CosmosClient Client = RntbdClient;
private static readonly AsyncLazy<Database> Database = new AsyncLazy<Database>(async () =>
{
Expand Down

0 comments on commit 9b396f7

Please sign in to comment.