diff --git a/packages/performance-tests/test/cases/identity-transformer.ts b/packages/performance-tests/test/cases/identity-transformer.ts index ab6b0367..42b62814 100644 --- a/packages/performance-tests/test/cases/identity-transformer.ts +++ b/packages/performance-tests/test/cases/identity-transformer.ts @@ -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 { diff --git a/packages/performance-tests/test/cases/prepare-fork.ts b/packages/performance-tests/test/cases/prepare-fork.ts index bdb6147b..8c3a65bd 100644 --- a/packages/performance-tests/test/cases/prepare-fork.ts +++ b/packages/performance-tests/test/cases/prepare-fork.ts @@ -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 { diff --git a/packages/performance-tests/test/iModelUtils.ts b/packages/performance-tests/test/iModelUtils.ts index e83ff963..610bc88f 100644 --- a/packages/performance-tests/test/iModelUtils.ts +++ b/packages/performance-tests/test/iModelUtils.ts @@ -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 {