@itwin/core-backend 5.9.1 → 5.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -1
- package/lib/cjs/BriefcaseManager.d.ts +9 -3
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
- package/lib/cjs/BriefcaseManager.js +19 -3
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/TxnManager.d.ts.map +1 -1
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/internal/cross-package.d.ts +1 -1
- package/lib/cjs/internal/cross-package.d.ts.map +1 -1
- package/lib/cjs/internal/cross-package.js +2 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/esm/BriefcaseManager.d.ts +9 -3
- package/lib/esm/BriefcaseManager.d.ts.map +1 -1
- package/lib/esm/BriefcaseManager.js +19 -3
- package/lib/esm/BriefcaseManager.js.map +1 -1
- package/lib/esm/TxnManager.d.ts.map +1 -1
- package/lib/esm/TxnManager.js.map +1 -1
- package/lib/esm/internal/cross-package.d.ts +1 -1
- package/lib/esm/internal/cross-package.d.ts.map +1 -1
- package/lib/esm/internal/cross-package.js +1 -1
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/test/hubaccess/SemanticRebase.test.js +46 -14
- package/lib/esm/test/hubaccess/SemanticRebase.test.js.map +1 -1
- package/package.json +13 -13
|
@@ -600,7 +600,7 @@ class TestIModel {
|
|
|
600
600
|
* Test suite for rebase logic with schema changes that require data transformations.
|
|
601
601
|
*/
|
|
602
602
|
describe("Semantic Rebase", function () {
|
|
603
|
-
this.timeout(
|
|
603
|
+
this.timeout(90000); // operations can be slow
|
|
604
604
|
let t;
|
|
605
605
|
before(async () => {
|
|
606
606
|
await TestUtils.shutdownBackend(); // Automatically TestUtils.startBackend() is called before every test suite starts we need to shut tht down and startup our new TestUtils with semantic rebase on
|
|
@@ -1236,6 +1236,38 @@ describe("Semantic Rebase", function () {
|
|
|
1236
1236
|
const schema = t.local.getSchemaProps("TestDomain");
|
|
1237
1237
|
chai.expect(schema.version).to.equal("01.00.02", "Local schema transformation should be preserved");
|
|
1238
1238
|
});
|
|
1239
|
+
it("bulk local elements survive semantic rebase with incoming transforming schema change", async function () {
|
|
1240
|
+
const runBulkRebaseTest = async (count) => {
|
|
1241
|
+
t = await TestIModel.initialize(`BulkElements${count}`);
|
|
1242
|
+
const farTxn = startTestTxn(t.far, `${count} elements rebase far`);
|
|
1243
|
+
const localTxn = startTestTxn(t.local, `${count} elements rebase local`);
|
|
1244
|
+
await t.local.locks.acquireLocks({ shared: t.drawingModelId });
|
|
1245
|
+
const elementIds = [];
|
|
1246
|
+
for (let i = 0; i < count; i++) {
|
|
1247
|
+
elementIds.push(t.insertElement(localTxn, "TestDomain:C", {
|
|
1248
|
+
propA: `bulk_a_${i}`,
|
|
1249
|
+
propC: `bulk_c_${i}`,
|
|
1250
|
+
}));
|
|
1251
|
+
}
|
|
1252
|
+
localTxn.saveChanges(`local insert ${count} elements`);
|
|
1253
|
+
await importSchemaStrings(farTxn, [TestIModel.schemas.v01x00x02MovePropCToA]);
|
|
1254
|
+
await pushChanges(farTxn, "far move PropC to A");
|
|
1255
|
+
await pullChanges(localTxn);
|
|
1256
|
+
t.local.clearCaches();
|
|
1257
|
+
for (let i = 0; i < count; i++) {
|
|
1258
|
+
const element = t.getElementProps(t.local, elementIds[i]);
|
|
1259
|
+
chai.expect(element.propA).to.equal(`bulk_a_${i}`, `Element ${i} propA should be preserved`);
|
|
1260
|
+
chai.expect(element.propC).to.equal(`bulk_c_${i}`, `Element ${i} propC should be preserved after transform`);
|
|
1261
|
+
}
|
|
1262
|
+
const schema = t.local.getSchemaProps("TestDomain");
|
|
1263
|
+
chai.expect(schema.version).to.equal("01.00.02", "Schema should be transformed to v01.00.02");
|
|
1264
|
+
t.shutdown();
|
|
1265
|
+
t = undefined;
|
|
1266
|
+
};
|
|
1267
|
+
await runBulkRebaseTest(133);
|
|
1268
|
+
await runBulkRebaseTest(100);
|
|
1269
|
+
await runBulkRebaseTest(101);
|
|
1270
|
+
});
|
|
1239
1271
|
it("should fail when importing schema with unsaved data changes", async () => {
|
|
1240
1272
|
t = await TestIModel.initialize("UnsavedDataChangesSchemaImport");
|
|
1241
1273
|
const localTxn = startTestTxn(t.local, "should fail when importing schema with unsaved data changes local");
|
|
@@ -1258,7 +1290,7 @@ describe("Semantic Rebase", function () {
|
|
|
1258
1290
|
* Test suite for tests related to rebase logic with schema changes (for indirect changes) that require data transformations.
|
|
1259
1291
|
*/
|
|
1260
1292
|
describe("Semantic Rebase with indirect changes", function () {
|
|
1261
|
-
this.timeout(
|
|
1293
|
+
this.timeout(90000); // operations can be slow
|
|
1262
1294
|
let t;
|
|
1263
1295
|
before(async () => {
|
|
1264
1296
|
await TestUtils.shutdownBackend(); // Automatically TestUtils.startBackend() is called before every test suite starts we need to shut tht down and startup our new TestUtils with semantic rebase on
|
|
@@ -1543,7 +1575,7 @@ describe("Semantic Rebase with indirect changes", function () {
|
|
|
1543
1575
|
* Test suite for data conflicts, conflict handlers, lifecycle events, and mixed schema+conflict scenarios during semantic rebase.
|
|
1544
1576
|
*/
|
|
1545
1577
|
describe("Semantic Rebase - Data Correctness Under Conflict", function () {
|
|
1546
|
-
this.timeout(
|
|
1578
|
+
this.timeout(90000);
|
|
1547
1579
|
let t;
|
|
1548
1580
|
before(async () => {
|
|
1549
1581
|
await TestUtils.shutdownBackend();
|
|
@@ -1755,7 +1787,7 @@ describe("Semantic Rebase - Data Correctness Under Conflict", function () {
|
|
|
1755
1787
|
* Tests scenarios where one or both sides import schemas in multiple sequential steps before the rebase.
|
|
1756
1788
|
*/
|
|
1757
1789
|
describe("Semantic Rebase - Multi-Step Schema Upgrade Chains", function () {
|
|
1758
|
-
this.timeout(
|
|
1790
|
+
this.timeout(90000);
|
|
1759
1791
|
let t;
|
|
1760
1792
|
before(async () => {
|
|
1761
1793
|
await TestUtils.shutdownBackend();
|
|
@@ -1939,7 +1971,7 @@ describe("Semantic Rebase - Multi-Step Schema Upgrade Chains", function () {
|
|
|
1939
1971
|
* Tests that aspect insert/update/delete operations are correctly captured and reinstated.
|
|
1940
1972
|
*/
|
|
1941
1973
|
describe("Semantic Rebase - ElementAspect Changes", function () {
|
|
1942
|
-
this.timeout(
|
|
1974
|
+
this.timeout(90000);
|
|
1943
1975
|
let t;
|
|
1944
1976
|
before(async () => {
|
|
1945
1977
|
await TestUtils.shutdownBackend();
|
|
@@ -2146,7 +2178,7 @@ describe("Semantic Rebase - ElementAspect Changes", function () {
|
|
|
2146
2178
|
* Ensures int, double, and boolean property values are preserved correctly through rebase.
|
|
2147
2179
|
*/
|
|
2148
2180
|
describe("Semantic Rebase - Property Type Variations", function () {
|
|
2149
|
-
this.timeout(
|
|
2181
|
+
this.timeout(90000);
|
|
2150
2182
|
let t;
|
|
2151
2183
|
before(async () => {
|
|
2152
2184
|
await TestUtils.shutdownBackend();
|
|
@@ -2334,7 +2366,7 @@ describe("Semantic Rebase - Property Type Variations", function () {
|
|
|
2334
2366
|
* Edge case where both local and far delete the same element independently.
|
|
2335
2367
|
*/
|
|
2336
2368
|
describe("Semantic Rebase - Both Sides Delete Same Element", function () {
|
|
2337
|
-
this.timeout(
|
|
2369
|
+
this.timeout(90000);
|
|
2338
2370
|
let t;
|
|
2339
2371
|
before(async () => {
|
|
2340
2372
|
await TestUtils.shutdownBackend();
|
|
@@ -2392,7 +2424,7 @@ describe("Semantic Rebase - Both Sides Delete Same Element", function () {
|
|
|
2392
2424
|
* Tests interactions when three separate briefcases are involved in schema+data operations.
|
|
2393
2425
|
*/
|
|
2394
2426
|
describe("Semantic Rebase - Three Briefcase Scenarios", function () {
|
|
2395
|
-
this.timeout(
|
|
2427
|
+
this.timeout(90000);
|
|
2396
2428
|
let t;
|
|
2397
2429
|
before(async () => {
|
|
2398
2430
|
await TestUtils.shutdownBackend();
|
|
@@ -2508,7 +2540,7 @@ describe("Semantic Rebase - Three Briefcase Scenarios", function () {
|
|
|
2508
2540
|
* pulls multiple times before pushing, accumulating rebase operations.
|
|
2509
2541
|
*/
|
|
2510
2542
|
describe("Semantic Rebase - Multiple Pulls Without Push", function () {
|
|
2511
|
-
this.timeout(
|
|
2543
|
+
this.timeout(90000);
|
|
2512
2544
|
let t;
|
|
2513
2545
|
before(async () => {
|
|
2514
2546
|
await TestUtils.shutdownBackend();
|
|
@@ -2591,7 +2623,7 @@ describe("Semantic Rebase - Multiple Pulls Without Push", function () {
|
|
|
2591
2623
|
* Tests that newly added entity classes and their instances survive semantic rebase.
|
|
2592
2624
|
*/
|
|
2593
2625
|
describe("Semantic Rebase - New Class Addition to Schema", function () {
|
|
2594
|
-
this.timeout(
|
|
2626
|
+
this.timeout(90000);
|
|
2595
2627
|
let t;
|
|
2596
2628
|
before(async () => {
|
|
2597
2629
|
await TestUtils.shutdownBackend();
|
|
@@ -2719,7 +2751,7 @@ describe("Semantic Rebase - New Class Addition to Schema", function () {
|
|
|
2719
2751
|
* Tests boundary conditions like importing schema while rebasing, concurrent pull attempts, etc.
|
|
2720
2752
|
*/
|
|
2721
2753
|
describe("Semantic Rebase - Guard Conditions and Error Paths", function () {
|
|
2722
|
-
this.timeout(
|
|
2754
|
+
this.timeout(90000);
|
|
2723
2755
|
let t;
|
|
2724
2756
|
before(async () => {
|
|
2725
2757
|
await TestUtils.shutdownBackend();
|
|
@@ -2839,7 +2871,7 @@ describe("Semantic Rebase - Guard Conditions and Error Paths", function () {
|
|
|
2839
2871
|
* that need to be correctly captured and reinstated during semantic rebase.
|
|
2840
2872
|
*/
|
|
2841
2873
|
describe("Semantic Rebase - Complex Insert-Update-Delete Sequences", function () {
|
|
2842
|
-
this.timeout(
|
|
2874
|
+
this.timeout(90000);
|
|
2843
2875
|
let t;
|
|
2844
2876
|
before(async () => {
|
|
2845
2877
|
await TestUtils.shutdownBackend();
|
|
@@ -3004,7 +3036,7 @@ describe("Semantic Rebase - Complex Insert-Update-Delete Sequences", function ()
|
|
|
3004
3036
|
* Tests that rebase folder state is correctly managed in unusual lifecycle scenarios.
|
|
3005
3037
|
*/
|
|
3006
3038
|
describe("Semantic Rebase - Cleanup and Folder Lifecycle", function () {
|
|
3007
|
-
this.timeout(
|
|
3039
|
+
this.timeout(90000);
|
|
3008
3040
|
let t;
|
|
3009
3041
|
before(async () => {
|
|
3010
3042
|
await TestUtils.shutdownBackend();
|
|
@@ -3097,7 +3129,7 @@ describe("Semantic Rebase - Cleanup and Folder Lifecycle", function () {
|
|
|
3097
3129
|
});
|
|
3098
3130
|
});
|
|
3099
3131
|
describe("Semantic Rebase - Multi-Pull Verification", function () {
|
|
3100
|
-
this.timeout(
|
|
3132
|
+
this.timeout(120000);
|
|
3101
3133
|
let t;
|
|
3102
3134
|
before(async () => {
|
|
3103
3135
|
await TestUtils.shutdownBackend();
|