fix(metadata): bound cache maintenance and pool recovery
This commit is contained in:
1 parent
21af5cf600
commit
8c2b232243
41 files changed
+2747
-350
No files matched your search
@@ -127,6 +127,45 @@ describe("settings search", () => {
|
||||
expect(searchSettings(entries, "hidden in the background", "en").map((entry) => entry.id)).toEqual(["appearance-tray"]);
|
||||
});
|
||||
|
||||
it("indexes the metadata cache memory limit under data settings", () => {
|
||||
expect(SETTINGS_SEARCH_DEFINITIONS).toContainEqual(
|
||||
expect.objectContaining({
|
||||
id: "data-performance",
|
||||
category: "data",
|
||||
titleKey: "settings.performanceSection",
|
||||
targetId: "data-performance",
|
||||
}),
|
||||
);
|
||||
expect(SETTINGS_SEARCH_DEFINITIONS).toContainEqual(
|
||||
expect.objectContaining({
|
||||
id: "data-metadata-cache",
|
||||
category: "data",
|
||||
titleKey: "settings.metadataCacheMemoryLimit",
|
||||
targetId: "data-performance",
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it("renders the metadata cache memory limit in a performance section after export", () => {
|
||||
const exportSectionStart = settingsDialogSource.indexOf('t("settings.exportSection")');
|
||||
const performanceSectionStart = settingsDialogSource.indexOf('data-settings-search-id="data-performance"');
|
||||
const tableStructureSectionStart = settingsDialogSource.indexOf('t("settings.tableStructureSection")');
|
||||
const metadataCacheControl = settingsDialogSource.indexOf('id="metadata-cache-memory-limit"');
|
||||
|
||||
expect(exportSectionStart).toBeGreaterThan(-1);
|
||||
expect(performanceSectionStart).toBeGreaterThan(exportSectionStart);
|
||||
expect(tableStructureSectionStart).toBeGreaterThan(performanceSectionStart);
|
||||
expect(metadataCacheControl).toBeGreaterThan(performanceSectionStart);
|
||||
expect(metadataCacheControl).toBeLessThan(tableStructureSectionStart);
|
||||
});
|
||||
|
||||
it("defines the performance section title in every supported locale", () => {
|
||||
for (const locale of ["zh-CN", "zh-TW", "en", "es", "it", "ja", "ko", "pt-BR"]) {
|
||||
const source = readFileSync(new URL(`../../../i18n/locales/${locale}.ts`, import.meta.url), "utf8");
|
||||
expect(source, locale).toContain("performanceSection:");
|
||||
}
|
||||
});
|
||||
|
||||
it("activates result buttons through click for keyboard and assistive technology", () => {
|
||||
expect(settingsDialogSource).toMatch(/role="option"[\s\S]*?@mousedown\.prevent[\s\S]*?@click="void selectSettingsSearchResult\(result\)"/);
|
||||
});
|
||||
|
||||
@@ -200,6 +200,8 @@ export const SETTINGS_SEARCH_DEFINITIONS: readonly SettingsSearchDefinition[] =
|
||||
{ id: "data-export-row-limit-enabled", category: "data", titleKey: "settings.exportRowLimitEnabled", descriptionKey: "settings.exportRowLimitEnabledDescription", targetId: "data" },
|
||||
{ id: "data-export-row-limit", category: "data", titleKey: "settings.exportRowLimit", descriptionKey: "settings.exportRowLimitDescription", targetId: "data" },
|
||||
{ id: "data-export-keyset", category: "data", titleKey: "settings.queryExportKeysetOptimizationEnabled", descriptionKey: "settings.queryExportKeysetOptimizationEnabledDescription", targetId: "data" },
|
||||
{ id: "data-performance", category: "data", titleKey: "settings.performanceSection", targetId: "data-performance" },
|
||||
{ id: "data-metadata-cache", category: "data", titleKey: "settings.metadataCacheMemoryLimit", descriptionKey: "settings.metadataCacheMemoryLimitDescription", targetId: "data-performance" },
|
||||
{ id: "data-table-template", category: "data", titleKey: "settings.tableColumnTemplateFields", descriptionKey: "settings.tableColumnTemplateFieldsDescription", targetId: "table-column-templates" },
|
||||
{ id: "data-duckdb", category: "data", titleKey: "settings.duckDbWorkerProcessIsolation", descriptionKey: "settings.duckDbWorkerProcessIsolationDescription", targetId: "data", visible: desktopOnly },
|
||||
{ id: "data-duckdb-process-limit", category: "data", titleKey: "settings.duckDbWorkerMaxProcesses", descriptionKey: "settings.duckDbWorkerMaxProcessesDescription", targetId: "data", visible: desktopOnly },
|
||||
|
||||
Reference in new issue
Block a user