fix(settings): centralize draft normalization and use 60s query timeout

This commit is contained in:
t8y2 committed 2026-09-08 20:39:39 +08:00
1 parent 39e34d44f7
commit 1431d4996f
16 files changed
+239 -360

No files matched your search

+1 -1
View File
@@ -423,7 +423,7 @@ describe("normalizeEditorSettings", () => {
it("normalizes the global query timeout and inherited connection ids", () => {
expect(normalizeEditorSettings({}).globalConnectTimeoutSecs).toBe(10);
expect(normalizeEditorSettings({ globalConnectTimeoutSecs: 0 }).globalConnectTimeoutSecs).toBe(1);
expect(normalizeEditorSettings({}).globalQueryTimeoutSecs).toBe(30);
expect(normalizeEditorSettings({}).globalQueryTimeoutSecs).toBe(60);
expect(normalizeEditorSettings({ queryTimeoutSecs: 45 } as any).globalQueryTimeoutSecs).toBe(45);
expect(normalizeEditorSettings({ globalQueryTimeoutSecs: -1 }).globalQueryTimeoutSecs).toBe(0);
expect(normalizeEditorSettings({ globalQueryTimeoutSecs: 301 }).globalQueryTimeoutSecs).toBe(301);