Skip to content

Commit

Permalink
[Internal] Tests: Removes Direct/HTTPS emulator tests (#3679)
Browse files Browse the repository at this point in the history
* Removing direct/https tests

* mppreference
  • Loading branch information
ealsur committed Feb 2, 2023
1 parent 2608d4a commit d6a439f
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 209 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,6 @@ public async Task TestHeadersPassedinByClient()
Assert.AreEqual((ulong)SDKSupportedCapabilities.PartitionMerge, capability & (ulong)SDKSupportedCapabilities.PartitionMerge,$" received header value as {sdkSupportedCapability}");
}

[TestMethod]
public async Task TestEtagOnUpsertOperationForHttpsClient()
{
await this.TestEtagOnUpsertOperation(false, Protocol.Https);
}

[TestMethod]
public async Task TestEtagOnUpsertOperationForGatewayClient()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,6 @@ await this.ValidateStoredProcedureCrudAsync(ConsistencyLevel.Session,
new ConnectionPolicy { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Protocol.Tcp });
}

[TestMethod]
public async Task ValidateStoredProcedureCrud_SessionDirectHttps()
{
await this.ValidateStoredProcedureCrudAsync(ConsistencyLevel.Session,
new ConnectionPolicy { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Protocol.Https });
}

internal async Task ValidateStoredProcedureCrudAsync(ConsistencyLevel consistencyLevel, ConnectionPolicy connectionPolicy)
{
DocumentClient client = TestCommon.CreateClient(connectionPolicy.ConnectionMode == ConnectionMode.Gateway,
Expand Down Expand Up @@ -432,13 +425,6 @@ public void ValidateTriggerCrud_SessionDirectTcp()
new ConnectionPolicy { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Protocol.Tcp });
}

[TestMethod]
public void ValidateTriggerCrud_SessionDirectHttps()
{
this.ValidateTriggerCrud(ConsistencyLevel.Session,
new ConnectionPolicy { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Protocol.Https });
}

internal void ValidateTriggerCrud(ConsistencyLevel consistencyLevel, ConnectionPolicy connectionPolicy)
{
DocumentClient client = TestCommon.CreateClient(connectionPolicy.ConnectionMode == ConnectionMode.Gateway,
Expand Down Expand Up @@ -566,14 +552,6 @@ public void ValidateUserDefinedFunctionCrud_SessionDirectTcp()
new ConnectionPolicy { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Protocol.Tcp });
}

[TestMethod]

public void ValidateUserDefinedFunctionCrud_SessionDirectHttps()
{
this.ValidateUserDefinedFunctionCrud(ConsistencyLevel.Session,
new ConnectionPolicy { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Protocol.Https });
}

[TestMethod]
public void ValidateUserDefinedFunctionTimeout()
{
Expand Down Expand Up @@ -1501,7 +1479,6 @@ public async Task ValidateSystemSproc()
await this.ValidateSystemSprocInternal(true);
#if DIRECT_MODE
// DIRECT MODE has ReadFeed issues in the Public emulator
ValidateSystemSprocInternal(false, Protocol.Https);
ValidateSystemSprocInternal(false, Protocol.Tcp);
#endif
}
Expand Down Expand Up @@ -2183,7 +2160,6 @@ public async Task ValidateReadOnlyStoredProcedureExecution()
#if DIRECT_MODE
// DIRECT MODE has ReadFeed issues in the Public emulator
await ValidateReadOnlyStoredProcedureExecutionInternal(false, Protocol.Tcp);
await ValidateReadOnlyStoredProcedureExecutionInternal(false, Protocol.Https);
#endif
}

Expand Down Expand Up @@ -2559,7 +2535,6 @@ public async Task ValidateChangeFeedIfNoneMatch()
await this.ValidateChangeFeedIfNoneMatchHelper(true);
#if DIRECT_MODE
// DIRECT MODE has ReadFeed issues in the Public emulator
await ValidateChangeFeedIfNoneMatchHelper(false, Protocol.Https);
await ValidateChangeFeedIfNoneMatchHelper(false, Protocol.Tcp);
#endif
}
Expand Down Expand Up @@ -2709,7 +2684,6 @@ public async Task ValidateChangeFeedIfModifiedSince()
await this.ValidateChangeFeedIfModifiedSinceHelper(true);
#if DIRECT_MODE
// DIRECT MODE has ReadFeed issues in the Public emulator
await ValidateChangeFeedIfModifiedSinceHelper(false, Protocol.Https);
await ValidateChangeFeedIfModifiedSinceHelper(false, Protocol.Tcp);
#endif
}
Expand Down Expand Up @@ -2822,7 +2796,6 @@ private async Task ValidateChangeFeedIfModifiedSinceHelper(bool useGateway, Prot
public async Task ValidateChangeFeedWithPartitionKey()
{
await this.ValidateChangeFeedWithPartitionKeyHelper(true);
await this.ValidateChangeFeedWithPartitionKeyHelper(false, Protocol.Https);
await this.ValidateChangeFeedWithPartitionKeyHelper(false, Protocol.Tcp);
}

Expand Down Expand Up @@ -2999,7 +2972,6 @@ public async Task ValidateReadPartitionKeyRange()
await this.ValidateReadPartitionKeyRangeHelper(true);
#if DIRECT_MODE
// DIRECT MODE has ReadFeed issues in the Public emulator
await ValidateReadPartitionKeyRangeHelper(false, Protocol.Https);
await ValidateReadPartitionKeyRangeHelper(false, Protocol.Tcp);
#endif
}
Expand Down Expand Up @@ -3109,13 +3081,6 @@ public void ValidateGenericReadDocumentDirectTcp()
this.ValidateGenericReadDocumentFromResource(false, Protocol.Tcp).Wait();
}

[TestMethod]
public void ValidateGenericReadDocumentDirectHttps()
{
this.ValidateGenericReadDocument(false, Protocol.Https).Wait();
this.ValidateGenericReadDocumentFromResource(false, Protocol.Tcp).Wait();
}

private async Task ValidateGenericReadDocument(bool useGateway, Protocol protocol)
{
CosmosClient client = TestCommon.CreateCosmosClient(useGateway);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ public void TestCleanup()
HttpConstants.Versions.CurrentVersionUTF8 = this.currentVersionUTF8;
}

[TestMethod]
public void ValidatePageSizeHttps()
{
var client = TestCommon.CreateClient(false, Protocol.Https);
ValidatePageSize(client);
ValidatePageSize(client);
}

[TestMethod]
public void ValidatePageSizeRntbd()
{
Expand Down Expand Up @@ -182,13 +174,6 @@ public async Task ValidateConsistencyLevelRntbd()
await ValidateCosistencyLevel(client);
}

[TestMethod]
public async Task ValidateConsistencyLevelHttps()
{
DocumentClient client = TestCommon.CreateClient(false, Protocol.Https);
await ValidateCosistencyLevel(client);
}

private async Task ValidateCosistencyLevel(DocumentClient client)
{
DocumentCollection collection = TestCommon.CreateOrGetDocumentCollection(client);
Expand Down Expand Up @@ -232,13 +217,6 @@ public void ValidateJsonSerializationFormatRntbd()
ValidateJsonSerializationFormat(client);
}

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

private void ValidateJsonSerializationFormat(DocumentClient client)
{
DocumentCollection collection = TestCommon.CreateOrGetDocumentCollection(client);
Expand Down Expand Up @@ -342,14 +320,6 @@ public void ValidateIndexingDirectiveRntbd()
ValidateIndexingDirective(client);
}

[TestMethod]
public void ValidateIndexingDirectiveHttps()
{
//var client = TestCommon.CreateClient(false, Protocol.Https);
var client = TestCommon.CreateClient(true, Protocol.Https);
ValidateIndexingDirective(client);
}

private void ValidateIndexingDirective(DocumentClient client)
{
// Number out of range.
Expand Down Expand Up @@ -407,13 +377,6 @@ public void ValidateEnableScanInQueryRntbd()
ValidateEnableScanInQuery(client);
}

[TestMethod]
public void ValidateEnableScanInQueryHttps()
{
var client = TestCommon.CreateClient(false, Protocol.Https);
ValidateEnableScanInQuery(client);
}

private void ValidateEnableScanInQuery(DocumentClient client, bool isHttps = false)
{
// Value not boolean
Expand Down Expand Up @@ -460,14 +423,6 @@ public void ValidateEnableLowPrecisionOrderByRntbd()
ValidateEnableLowPrecisionOrderBy(client);
}

[TestMethod]

public void ValidateEnableLowPrecisionOrderByHttps()
{
var client = TestCommon.CreateClient(false, Protocol.Https);
ValidateEnableLowPrecisionOrderBy(client, true);
}

private void ValidateEnableLowPrecisionOrderBy(DocumentClient client, bool isHttps = false)
{
// Value not boolean
Expand Down Expand Up @@ -516,13 +471,6 @@ public void ValidateEmitVerboseTracesInQueryRntbd()
ValidateEmitVerboseTracesInQuery(client);
}

[TestMethod]
public void ValidateEmitVerboseTracesInQueryHttps()
{
var client = TestCommon.CreateClient(false, Protocol.Https);
ValidateEmitVerboseTracesInQuery(client, true);
}

private void ValidateEmitVerboseTracesInQuery(DocumentClient client, bool isHttps = false)
{
// Value not boolean
Expand Down Expand Up @@ -562,12 +510,6 @@ public void ValidateIfNonMatchGateway()
ValidateIfNonMatch(client);

}
[TestMethod]
public void ValidateIfNonMatchHttps()
{
var client = TestCommon.CreateClient(false, Protocol.Https);
ValidateIfNonMatch(client);
}

[TestMethod]
public void ValidateIfNonMatchRntbd()
Expand Down Expand Up @@ -719,11 +661,6 @@ public async Task ValidateCollectionIndexProgressHeaders()
await ValidateCollectionIndexProgressHeadersAsync(client, isElasticCollection: true);
}

using (var client = TestCommon.CreateClient(false, Protocol.Https))
{
await ValidateCollectionIndexProgressHeadersAsync(client, isElasticCollection: true);
}

using (var client = TestCommon.CreateClient(false, Protocol.Tcp))
{
await ValidateCollectionIndexProgressHeadersAsync(client, isElasticCollection: true);
Expand Down
Loading

0 comments on commit d6a439f

Please sign in to comment.