Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sourabh1007 committed Sep 2, 2023
1 parent 2dd1c05 commit b1bdbeb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static bool IsLatencyThresholdCrossed(
OperationType operationType,
OpenTelemetryAttributes response)
{
config ??= new CosmosThresholdOptions();
TimeSpan latencyThreshold = operationType == OperationType.Query ? config.NonPointOperationLatencyThreshold : config.PointOperationLatencyThreshold;
return response.Diagnostics.GetClientElapsedTime() > latencyThreshold;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ await base.TestInit(validateSinglePartitionKeyRangeCacheCall: false,
customizeClientBuilder: (builder) => builder
.WithClientTelemetryOptions(new CosmosClientTelemetryOptions()
{
DisableDistributedTracing = enableDistributingTracing
DisableDistributedTracing = !enableDistributingTracing
})
.WithConnectionModeGateway());
}
Expand All @@ -192,7 +192,7 @@ await base.TestInit(validateSinglePartitionKeyRangeCacheCall: false,
customizeClientBuilder: (builder) => builder
.WithClientTelemetryOptions(new CosmosClientTelemetryOptions()
{
DisableDistributedTracing = enableDistributingTracing
DisableDistributedTracing = !enableDistributingTracing
}));
}

Expand Down

0 comments on commit b1bdbeb

Please sign in to comment.