fix(chaos): finalized system-wide reconstruction to resolve FiveAM and EOF failures
This commit is contained in:
@@ -9,15 +9,18 @@ The *LLM Gateway* skill provides a unified interface for interacting with multip
|
||||
* Test Suite
|
||||
#+begin_src lisp :tangle tests/llm-gateway-tests.lisp
|
||||
(defpackage :opencortex-llm-gateway-tests
|
||||
(:use :cl :fiveam :opencortex)
|
||||
(:use :cl :opencortex)
|
||||
(:export #:llm-gateway-suite))
|
||||
|
||||
(in-package :opencortex-llm-gateway-tests)
|
||||
|
||||
(def-suite llm-gateway-suite :description "Tests for the LLM Gateway skill")
|
||||
(in-suite llm-gateway-suite)
|
||||
(eval-when (:compile-toplevel :load-toplevel :execute)
|
||||
(ql:quickload :fiveam))
|
||||
|
||||
(test test-llm-gateway-timeout
|
||||
(fiveam:def-suite llm-gateway-suite :description "Tests for the LLM Gateway skill")
|
||||
(fiveam:in-suite llm-gateway-suite)
|
||||
|
||||
(fiveam:test test-llm-gateway-timeout
|
||||
"Tier 2 Chaos: Verify that LLM Gateway handles connection failures gracefully."
|
||||
(let ((old-host (uiop:getenv "OLLAMA_HOST")))
|
||||
(unwind-protect
|
||||
@@ -27,9 +30,9 @@ The *LLM Gateway* skill provides a unified interface for interacting with multip
|
||||
(find-symbol "EXECUTE-LLM-REQUEST" :opencortex))))
|
||||
(if fn
|
||||
(let ((result (funcall fn :prompt "hello" :provider :ollama)))
|
||||
(is (eq (getf result :status) :error))
|
||||
(is (uiop:string-prefix-p "Ollama Failure" (getf result :message))))
|
||||
(fail "Could not find EXECUTE-LLM-REQUEST symbol"))))
|
||||
(fiveam:is (eq (getf result :status) :error))
|
||||
(fiveam:is (uiop:string-prefix-p "Ollama Failure" (getf result :message))))
|
||||
(fiveam:fail "Could not find EXECUTE-LLM-REQUEST symbol"))))
|
||||
(if old-host
|
||||
(setf (uiop:getenv "OLLAMA_HOST") old-host)
|
||||
(sb-posix:unsetenv "OLLAMA_HOST")))))
|
||||
|
||||
Reference in New Issue
Block a user