diff --git a/CLAUDE.md b/CLAUDE.md index c6953f3c..c38aa9a6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -11,8 +11,10 @@ llama-swap is a light weight, transparent proxy server that provides automatic m ## Testing -- `make test-dev` - Use this when making iterative changes. Runs `go test` and `staticcheck`. Fix any static checking errors. Use this only when changes are made to any code under the `proxy/` directory -- `make test-all` - runs at the end before completing work. Includes long running concurrency tests. +- Follow test naming conventions like `TestProxyManager_`, `TestProcessGroup_`, etc. +- Use `go test -v -run ` to run any new tests you've written. +- Use `make test-dev` after running new tests for a quick over all test run. This runs `go test` and `staticcheck`. Fix any static checking errors. Use this only when changes are made to any code under the `proxy/` directory +- Use `make test-all` before completing work. This includes long running concurrency tests. ## Workflow Tasks diff --git a/proxy/process_test.go b/proxy/process_test.go index de226614..3881c3dd 100644 --- a/proxy/process_test.go +++ b/proxy/process_test.go @@ -395,6 +395,10 @@ func TestProcess_StopImmediately(t *testing.T) { // Test that SIGKILL is sent when gracefulStopTimeout is reached and properly terminates // the upstream command func TestProcess_ForceStopWithKill(t *testing.T) { + if testing.Short() { + t.Skip("skipping slow test") + } + if runtime.GOOS == "windows" { t.Skip("skipping SIGTERM test on Windows ") } diff --git a/proxy/processgroup_test.go b/proxy/processgroup_test.go index f10293ae..6b90f443 100644 --- a/proxy/processgroup_test.go +++ b/proxy/processgroup_test.go @@ -49,6 +49,10 @@ func TestProcessGroup_HasMember(t *testing.T) { // TestProcessGroup_ProxyRequestSwapIsTrueParallel tests that when swap is true // and multiple requests are made in parallel, only one process is running at a time. func TestProcessGroup_ProxyRequestSwapIsTrueParallel(t *testing.T) { + if testing.Short() { + t.Skip("skipping slow test") + } + var processGroupTestConfig = config.AddDefaultGroupToConfig(config.Config{ HealthCheckTimeout: 15, Models: map[string]config.ModelConfig{ diff --git a/proxy/proxymanager_test.go b/proxy/proxymanager_test.go index 2330b32b..36807847 100644 --- a/proxy/proxymanager_test.go +++ b/proxy/proxymanager_test.go @@ -523,6 +523,10 @@ func TestProxyManager_ListModelsHandler_IncludeAliasesInList(t *testing.T) { } func TestProxyManager_Shutdown(t *testing.T) { + if testing.Short() { + t.Skip("skipping slow test") + } + // make broken model configurations model1Config := getTestSimpleResponderConfigPort("model1", 9991) model1Config.Proxy = "http://localhost:10001/"