Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhandelwal-123 committed Jan 13, 2025
1 parent 4dcbb35 commit dc7bfff
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 49 deletions.
1 change: 1 addition & 0 deletions sdk/cosmosdb/cosmos/review/cosmos.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,7 @@ export interface FeedOptions extends SharedOptions {
continuationToken?: string;
continuationTokenLimitInKB?: number;
disableNonStreamingOrderByQuery?: boolean;
enableQueryControl?: boolean;
enableScanInQuery?: boolean;
forceQueryPlan?: boolean;
maxDegreeOfParallelism?: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ export abstract class ParallelQueryExecutionContextBase implements ExecutionCont
documentProducer: DocumentProducer,
): Promise<void> => {
try {
await documentProducer.bufferMore(this.getDiagnosticNode());
await documentProducer.bufferMore(diagnosticNode);
// if buffer of document producer is filled, add it to the buffered document producers queue
const nextItem = documentProducer.peakNextItem();
if (nextItem !== undefined) {
Expand All @@ -443,10 +443,7 @@ export abstract class ParallelQueryExecutionContextBase implements ExecutionCont
// So that later parts of the code can repair the execution context
// refresh the partition key ranges and ctreate new document producers and add it to the queue

await this._enqueueReplacementDocumentProducers(
this.getDiagnosticNode(),
documentProducer,
);
await this._enqueueReplacementDocumentProducers(diagnosticNode, documentProducer);
resolve();
} else {
this.err = err;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe("PipelineQueryExecutionContext", function () {
);
// Mock the endpoint's fetchMore method to return 3 documents in every call
context["endpoint"] = {
fetchMore: async (diagnosticNode: any) => {
fetchMore: async () => {
return {
result: [
createMockDocument("1", "doc1", "value1"),
Expand Down Expand Up @@ -123,7 +123,7 @@ describe("PipelineQueryExecutionContext", function () {
);
let i = 0;
context["endpoint"] = {
fetchMore: async (diagnosticNode: any) => {
fetchMore: async () => {
if (i < 3) {
i++;
return {
Expand Down Expand Up @@ -166,7 +166,7 @@ describe("PipelineQueryExecutionContext", function () {
);
let i = 0;
context["endpoint"] = {
fetchMore: async (diagnosticNode: any) => {
fetchMore: async () => {
if (i < 1) {
i++;
return {
Expand Down Expand Up @@ -207,7 +207,7 @@ describe("PipelineQueryExecutionContext", function () {
false,
);
context["endpoint"] = {
fetchMore: async (diagnosticNode: any) => {
fetchMore: async () => {
return {
result: undefined,
headers: {},
Expand Down Expand Up @@ -237,7 +237,7 @@ describe("PipelineQueryExecutionContext", function () {
);
let i = 0;
context["endpoint"] = {
fetchMore: async (diagnosticNode: any) => {
fetchMore: async () => {
if (i < 1) {
i++;
return {
Expand Down Expand Up @@ -282,7 +282,7 @@ describe("PipelineQueryExecutionContext", function () {
true,
);
context["endpoint"] = {
fetchMore: async (diagnosticNode: any) => {
fetchMore: async () => {
return {
result: [
createMockDocument("1", "doc1", "value1"),
Expand Down
29 changes: 0 additions & 29 deletions sdk/cosmosdb/cosmos/test/public/functional/test-query.spec.ts

This file was deleted.

0 comments on commit dc7bfff

Please sign in to comment.