Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/js signoff pipeline #29442

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/cosmosdb/cosmos/package.json
Expand Up @@ -60,7 +60,7 @@
"extract-api": "npm run check:src:strict && npm run build:src && dev-tool run extract-api",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"samples-dev/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
"integration-test:browser": "echo skipped",
"integration-test:node": "cross-env NODE_OPTIONS='--dns-result-order=ipv4first' mocha --loader=ts-node -r test/mocha.env.ts -r ts-node/register -r dotenv/config -r ./test/public/common/setup.ts --reporter ../../../common/tools/mocha-multi-reporter.js --reporter-option output=test-results.xml \"./test/internal/**/*.spec.ts\" \"./test/public/**/*.spec.ts\" --timeout 100000",
"integration-test:node": "cross-env NODE_OPTIONS='--dns-result-order=ipv4first' mocha -r test/mocha.env.ts -r ts-node/register -r dotenv/config -r ./test/public/common/setup.ts --reporter ../../../common/tools/mocha-multi-reporter.js --reporter-option output=test-results.xml \"./test/internal/**/*.spec.ts\" \"./test/public/**/*.spec.ts\" --timeout 100000",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json src test --ext .ts",
Expand Down
7 changes: 3 additions & 4 deletions sdk/cosmosdb/cosmos/src/utils/hashing/encoding/number.ts
Expand Up @@ -50,10 +50,9 @@ export function writeNumberForBinaryEncodingJSBI(hash: number): Buffer {
function encodeNumberAsUInt64JSBI(value: number): JSBI {
const rawValueBits = getRawBitsJSBI(value);
const mask = JSBI.BigInt(0x8000000000000000);
const returned =
rawValueBits < mask
? JSBI.bitwiseXor(rawValueBits, mask)
: JSBI.add(JSBI.bitwiseNot(rawValueBits), JSBI.BigInt(1));
const returned = JSBI.greaterThan(mask, rawValueBits)
? JSBI.bitwiseXor(rawValueBits, mask)
: JSBI.add(JSBI.bitwiseNot(rawValueBits), JSBI.BigInt(1));
return returned;
}

Expand Down
2 changes: 2 additions & 0 deletions sdk/cosmosdb/cosmos/test/internal/session.spec.ts
Expand Up @@ -69,6 +69,7 @@ describe("New session token", function () {
});
assert.equal(responseToken, token);
assert.equal(responseToken, rqContext?.headers["x-ms-session-token"]);
await container.database.delete();
});
});

Expand Down Expand Up @@ -166,6 +167,7 @@ describe("Integrated Cache Staleness", async function (this: Suite) {
this.dedicatedGatewayMaxAge = 0;
await container.read(this.dedicatedGatewayMaxAge);
});
await database.delete();
});

// This test has to be run against sqlx endpoint
Expand Down
Expand Up @@ -81,7 +81,7 @@ describe("Client Tests", function (this: Suite) {
}
});
});
describe("Validate user passed AbortController.signal", function () {
describe.skip("Validate user passed AbortController.signal", function () {
it("should throw exception if aborted during the request", async function () {
const client = new CosmosClient({ endpoint, key: masterKey });
try {
Expand Down
Expand Up @@ -232,6 +232,9 @@ describe("test bulk operations", async function () {
class: "2010",
});
});
after(async () => {
await container.database.delete();
});
it("deletes operation with default partition", async function () {
const operation: OperationInput = {
operationType: BulkOperationType.Delete,
Expand Down Expand Up @@ -949,6 +952,9 @@ describe("test bulk operations", async function () {
createItemId = addEntropy("createItem");
upsertItemId = addEntropy("upsertItem");
});
after(async () => {
await container.database.delete();
});
it("creates an item with nested object partition key", async function () {
const operations: OperationInput[] = [
{
Expand Down
Expand Up @@ -586,6 +586,9 @@ describe("test changefeed allVersionsAndDeletes mode for entire container", func
}
assert.strictEqual(counter, 20, "20 results should be fetched");
});
after(async function () {
await container.delete();
});
});

describe("test changefeed allVersionsAndDeletes mode for a feed range", function () {
Expand Down Expand Up @@ -724,6 +727,9 @@ describe("test changefeed allVersionsAndDeletes mode for a feed range", function
}
assert.strictEqual(counter, 5, "5 results should be fetched");
});
after(async function () {
await container.delete();
});
});

describe("test changefeed allVersionsAndDeletes mode for a partition key", function () {
Expand Down Expand Up @@ -861,4 +867,7 @@ describe("test changefeed allVersionsAndDeletes mode for a partition key", funct
}
assert.strictEqual(counter, 5, "5 results should be fetched");
});
after(async function () {
await container.delete();
});
});
Expand Up @@ -61,6 +61,7 @@ describe("Timeout", function () {
} catch (e: any) {
assert.equal(e.code, "TimeoutError");
}
await clientA.database(dbId).delete();
});
});

Expand Down