Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 54 additions & 54 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/framework-common-helpers/src/http-service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as https from 'https'
import { RequestOptions } from 'https'
import * as http from 'http'
import { IncomingMessage } from 'node:http'
import { IncomingMessage, OutgoingHttpHeaders } from 'node:http'

export interface PostConfiguration {
contentType?: string
Expand Down Expand Up @@ -29,13 +29,13 @@
timeout: timeout,
}
if (data) {
options.headers!['Content-Length'] = data.length
;(options.headers as OutgoingHttpHeaders)['Content-Length'] = data.length
}

return new Promise((resolve, reject) => {
const method = url.startsWith('https') ? https.request : http.request
const request = method(url, options, (res: IncomingMessage) => {
const body: Array<any> = []

Check warning on line 38 in packages/framework-common-helpers/src/http-service.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
res.on('data', (chunk) => body.push(chunk))
res.on('end', () => {
if (!res?.statusCode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1550,10 +1550,13 @@ describe('Read models end-to-end tests', () => {
if (process.env.TESTED_PROVIDER === 'AZURE' || process.env.TESTED_PROVIDER === 'LOCAL') {
// Cursor can be either continuation token format or legacy offset format
if (cursor.continuationToken) {
// New continuation token format
// Continuation token format - includes both continuationToken and page-based id
expect(cursor.continuationToken).to.be.a('string')
expect(cursor.continuationToken).to.not.be.empty
expect(cursor.id).to.be.undefined
expect(cursor.id).to.be.a('string')
expect(cursor.id).to.not.be.empty
// Verify page-based id matches the expected sequence (previousOffset + limit)
expect(cursor.id).to.equal((i + 1).toString())
} else if (cursor.id) {
expect(cursor.id).to.be.a('string')
expect(cursor.id).to.not.be.empty
Expand Down Expand Up @@ -1617,11 +1620,11 @@ describe('Read models end-to-end tests', () => {
expect(result.items.length).to.equal(1)
expect(result.count).to.equal(1)

// Verify the returned cursor is correctly calculated using our fixed logic
// Verify the returned cursor is correctly calculated: previousOffset + limit
if (result.cursor) {
expect(result.cursor.id).to.be.a('string')
expect(result.cursor.id).to.not.be.empty
// Should be '2' (1 + 1 result returned) based on our fixed logic: currentOffset + finalResources.length
// Should be '2' (offset 1 + limit 1) based on page-based cursor logic
expect(result.cursor.id).to.equal('2')
// Legacy cursors don't have continuation tokens
expect(result.cursor.continuationToken).to.be.undefined
Expand Down
Loading
Loading