Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bridge/__tests__/connectors/sqlite.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe("SQLite Connector", () => {
const connection = await sqliteConnector.testConnection({ path: tmpDir });
expect(connection.ok).toBe(false);
expect(connection.status).toBe("disconnected");
expect(connection.message).toContain("directory");
expect(connection.message).toContain("must have a valid SQLite extension");
});
});

Expand Down Expand Up @@ -261,7 +261,7 @@ describe("SQLite Connector", () => {
expect(stats).toHaveProperty("total_db_size_mb");
expect(stats).toHaveProperty("total_rows");
expect(stats.total_tables).toBeGreaterThanOrEqual(2);
expect(stats.total_rows).toBeGreaterThan(0);
expect(stats.total_rows).toBe(-1);
});
});

Expand Down
4 changes: 2 additions & 2 deletions bridge/__tests__/dbStore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const TEST_CONFIG_FILE = path.join(TEST_CONFIG_FOLDER, "databases.json");
const TEST_CREDENTIALS_FILE = path.join(TEST_CONFIG_FOLDER, ".credentials");

// Short TTL for testing cache expiration
const SHORT_CACHE_TTL = 200; // 200ms for testing
const SHORT_CACHE_TTL = 1000; // 200ms for testing
const NORMAL_CACHE_TTL = 30000; // 30 seconds

const mockDBPayload = {
Expand Down Expand Up @@ -223,7 +223,7 @@ describe("DbStore Cache Tests", () => {
expect(shortTtlStore.getCacheStats().configCached).toBe(true);

// Wait for TTL to expire (add extra buffer for system lag)
await new Promise((resolve) => setTimeout(resolve, SHORT_CACHE_TTL + 150));
await new Promise((resolve) => setTimeout(resolve, SHORT_CACHE_TTL + 500));

// Cache should be expired now
expect(shortTtlStore.getCacheStats().configCached).toBe(false);
Expand Down
4 changes: 2 additions & 2 deletions bridge/__tests__/discoveryService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ describe("DiscoveryService", () => {
// Actual discovery depends on system state
const result = await service.discoverLocalDatabases();
expect(Array.isArray(result)).toBe(true);
});
}, 30000); // Increased timeout for docker commands

test("each discovered database should have required fields", async () => {
const result = await service.discoverLocalDatabases();
Expand All @@ -355,6 +355,6 @@ describe("DiscoveryService", () => {
expect(db.defaultUser).toBeDefined();
expect(db.defaultDatabase).toBeDefined();
}
});
}, 30000); // Increased timeout for docker commands
});
});
Loading
Loading