Skip to content

Commit

Permalink
fix everything except performance tests that want to apply single cha…
Browse files Browse the repository at this point in the history
…ngeset.
  • Loading branch information
pmconne committed Dec 25, 2024
1 parent 175e5c6 commit a73834f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default async function identityTransformer(context: TestCaseContext) {
path.join(os.tmpdir(), "identity-test-schemas-dump-")
);
// eslint-disable-next-line @itwin/no-internal, deprecation/deprecation
sourceDb.nativeDb.exportSchemas(schemaDumpDir);
sourceDb.exportSchemas(schemaDumpDir);
Logger.logInfo(loggerCategory, `dumped schemas to: ${schemaDumpDir}`);
throw err;
} finally {
Expand Down
2 changes: 1 addition & 1 deletion packages/performance-tests/test/cases/prepare-fork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default async function prepareFork(context: TestCaseContext) {
path.join(os.tmpdir(), "fork-test-schemas-dump-")
);
// eslint-disable-next-line @itwin/no-internal, deprecation/deprecation
sourceDb.nativeDb.exportSchemas(schemaDumpDir);
sourceDb.exportSchemas(schemaDumpDir);
Logger.logInfo(loggerCategory, `dumped schemas to: ${schemaDumpDir}`);
throw err;
} finally {
Expand Down
11 changes: 1 addition & 10 deletions packages/performance-tests/test/iModelUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,7 @@ export interface IModelParams {
// TODO: dedup with other packages
// for testing purposes only, based on SetToStandalone.ts, force a snapshot to mimic a standalone iModel
export function setToStandalone(iModelPath: string) {
// eslint-disable-next-line @itwin/no-internal, deprecation/deprecation
const nativeDb = new IModelHost.platform.DgnDb();
nativeDb.openIModel(iModelPath, OpenMode.ReadWrite);
nativeDb.setITwinId(Guid.empty); // empty iTwinId means "standalone"
nativeDb.saveChanges(); // save change to iTwinId
nativeDb.deleteAllTxns(); // necessary before resetting briefcaseId
nativeDb.resetBriefcaseId(BriefcaseIdValue.Unassigned); // standalone iModels should always have BriefcaseId unassigned
nativeDb.saveLocalValue("StandaloneEdit", JSON.stringify({ txns: true }));
nativeDb.saveChanges(); // save change to briefcaseId
nativeDb.closeFile();
StandaloneDb.convertToStandalone(iModelPath);
}

export function generateTestIModel(iModelParam: IModelParams): TestIModel {
Expand Down

0 comments on commit a73834f

Please sign in to comment.