test: stabilize local session lifecycle timing
This commit is contained in:
@@ -113,7 +113,7 @@ func TestProcessSessionLocalSnakeCaseAndLifecycle(t *testing.T) {
|
|||||||
if w.Code != http.StatusOK {
|
if w.Code != http.StatusOK {
|
||||||
t.Fatalf("start status=%d body=%s", w.Code, w.Body.String())
|
t.Fatalf("start status=%d body=%s", w.Code, w.Body.String())
|
||||||
}
|
}
|
||||||
time.Sleep(400 * time.Millisecond)
|
time.Sleep(1 * time.Second)
|
||||||
req = httptest.NewRequest(http.MethodPost, "/api/v1/process/session?action=read", strings.NewReader(`{"device":"local","session_id":"session-test-001"}`))
|
req = httptest.NewRequest(http.MethodPost, "/api/v1/process/session?action=read", strings.NewReader(`{"device":"local","session_id":"session-test-001"}`))
|
||||||
w = httptest.NewRecorder()
|
w = httptest.NewRecorder()
|
||||||
s.processSession(w, req)
|
s.processSession(w, req)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ var registry = map[string]ToolSpec{
|
|||||||
|
|
||||||
var actionTools = map[string]string{
|
var actionTools = map[string]string{
|
||||||
"read": "read_file", "probe": "read_file", "write": "write_file",
|
"read": "read_file", "probe": "read_file", "write": "write_file",
|
||||||
"mcp": "mcp_call", "exec": "exec_command",
|
"mcp": "mcp_call", "exec": "exec_command", "diagnostic": "diagnostic_command",
|
||||||
}
|
}
|
||||||
|
|
||||||
func Lookup(name string) (ToolSpec, bool) {
|
func Lookup(name string) (ToolSpec, bool) {
|
||||||
|
|||||||
Reference in New Issue
Block a user