Skip to content

Commit 5d72657

Browse files
committed
Fix integration test
1 parent f96e532 commit 5d72657

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ jobs:
3636
- name: Setup model server
3737
run: |
3838
curl -fsSL https://ollama.com/install.sh | sh
39+
export OLLAMA_NUM_PARALLEL=2
40+
export OLLAMA_FLASH_ATTENTION=1
41+
export OLLAMA_KV_CACHE_TYPE=q4_0
3942
ollama serve &
4043
sleep 5
41-
ollama run llama3.2:3b &
44+
curl http://localhost:11434/api/generate -d '{"model": "llama3.2:3b", "keep_alive": -1}'
4245
curl -s http://localhost:11434/api/tags || exit 1
4346
4447
# Checks-out your repository under $GITHUB_WORKSPACE, which is the CWD for
@@ -55,7 +58,7 @@ jobs:
5558
# Test the project
5659
- name: Run Unit tests
5760
run: |
58-
bazel test //...
61+
bazel test //... --flaky_test_attempts=3
5962
6063
# Run Address Sanitizer
6164
# - name: Address Sanitizer

tests/integration_test/test_aiserver.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ TEST_F(AiServerIntegrationTest, AiServerTest)
8080

8181
// Validate results
8282
std::string response(output_buffer);
83-
ASSERT_TRUE(response.find("Washington, D.C.") != std::string::npos)
83+
ASSERT_TRUE(
84+
response.find("Washington, D.C.") != std::string::npos ||
85+
response.find("Washington D.C.") != std::string::npos)
8486
<< "Expected response to contain 'Washington, D.C.', but got: " << response;
8587

8688
// Cleanup

0 commit comments

Comments
 (0)