Skip to content
Merged
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
6 changes: 3 additions & 3 deletions tests/ipcMain/ollama.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describeOllama("IpcMain Ollama integration tests", () => {

// Ensure Ollama model is available (idempotent - fast if cached)
await ensureOllamaModel(OLLAMA_MODEL);
}, 150000); // 150s timeout for tokenizer loading + potential model pull
}); // 150s timeout handling managed internally or via global config

test("should successfully send message to Ollama and receive response", async () => {
// Setup test environment
Expand All @@ -114,9 +114,9 @@ describeOllama("IpcMain Ollama integration tests", () => {

// Collect and verify stream events
const collector = createEventCollector(env.sentEvents, workspaceId);
const streamEnd = await collector.waitForEvent("stream-end", 30000);
const streamEnd = await collector.waitForEvent("stream-end", 60000);

expect(streamEnd).toBeDefined();
expect(streamEnd).not.toBeNull();
assertStreamSuccess(collector);

// Verify we received deltas
Expand Down
7 changes: 7 additions & 0 deletions tests/ipcMain/queuedMessages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@ describeIntegration("IpcMain queuedMessages integration tests", () => {
await sendMessage(env.mockIpcRenderer, workspaceId, "Message 3");

// Verify all messages queued
// Wait until we have 3 messages in the queue state
const success = await waitFor(async () => {
const msgs = await getQueuedMessages(collector1, 500);
return msgs.length === 3;
}, 5000);
expect(success).toBe(true);

const queued = await getQueuedMessages(collector1);
expect(queued).toEqual(["Message 1", "Message 2", "Message 3"]);

Expand Down
10 changes: 5 additions & 5 deletions tests/ipcMain/resumeStream.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describeIntegration("IpcMain resumeStream integration tests", () => {
// Wait for stream to start
const collector1 = createEventCollector(env.sentEvents, workspaceId);
const streamStartEvent = await collector1.waitForEvent("stream-start", 5000);
expect(streamStartEvent).toBeDefined();
expect(streamStartEvent).not.toBeNull();

// Wait for at least some content or tool call to start
await waitFor(() => {
Expand Down Expand Up @@ -92,11 +92,11 @@ describeIntegration("IpcMain resumeStream integration tests", () => {

// Wait for new stream to start
const resumeStreamStart = await collector2.waitForEvent("stream-start", 5000);
expect(resumeStreamStart).toBeDefined();
expect(resumeStreamStart).not.toBeNull();

// Wait for stream to complete
const streamEnd = await collector2.waitForEvent("stream-end", 30000);
expect(streamEnd).toBeDefined();
expect(streamEnd).not.toBeNull();

// Verify no new user message was created
collector2.collect();
Expand Down Expand Up @@ -179,11 +179,11 @@ describeIntegration("IpcMain resumeStream integration tests", () => {

// Wait for stream to start
const streamStart = await collector.waitForEvent("stream-start", 10000);
expect(streamStart).toBeDefined();
expect(streamStart).not.toBeNull();

// Wait for stream to complete
const streamEnd = await collector.waitForEvent("stream-end", 30000);
expect(streamEnd).toBeDefined();
expect(streamEnd).not.toBeNull();

// Verify no user message was created (resumeStream should not add one)
collector.collect();
Expand Down