Skip to content

Commit ed504fd

Browse files
authored
Increasing the timeout a bit to avoid e2e test failures on a cold machine (#47)
Following the `README` instructions on local deployment _and_ e2e tests [here](https://github.com/llamastack/llama-stack-k8s-operator?tab=readme-ov-file#running-e2e-tests), I ran into an issue when executing the tests on a fresh/cold installed `kind` instance. Here is the stack-trace: ``` === RUN   TestE2E/creation === RUN   TestE2E/creation/should_create_LlamaStackDistribution     creation_test.go:29:                 Error Trace:    /home/matzew/go/src/github.com/llamastack/llama-stack-k8s-operator/tests/e2e/creation_test.go:81                                                         /home/matzew/go/src/github.com/llamastack/llama-stack-k8s-operator/tests/e2e/creation_test.go:29                 Error:          Received unexpected error:                                 context deadline exceeded                 Test:           TestE2E/creation/should_create_LlamaStackDistribution === RUN   TestE2E/creation/should_create_PVC_if_storage_is_configured --- FAIL: TestE2E (120.05s)     --- PASS: TestE2E/validation (0.02s)         --- PASS: TestE2E/validation/should_validate_CRDs (0.01s)         --- PASS: TestE2E/validation/should_validate_operator_deployment (0.00s)         --- PASS: TestE2E/validation/should_validate_operator_pods (0.00s)         --- PASS: TestE2E/validation/should_validate_prerequisites (0.00s)     --- FAIL: TestE2E/creation (120.03s)         --- FAIL: TestE2E/creation/should_create_LlamaStackDistribution (120.03s)         --- FAIL: TestE2E/creation/should_create_PVC_if_storage_is_configured (0.00s) panic: runtime error: invalid memory address or nil pointer dereference [recovered]         panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x13a983c] goroutine 40 [running]: testing.tRunner.func1.2({0x1529c80, 0x248a9b0})         /usr/local/go/src/testing/testing.go:1734 +0x21c testing.tRunner.func1()         /usr/local/go/src/testing/testing.go:1737 +0x35e panic({0x1529c80?, 0x248a9b0?})         /usr/local/go/src/runtime/panic.go:787 +0x132 github.com/llamastack/llama-stack-k8s-operator/tests/e2e.testPVCConfiguration(0xc000502c40, 0x0)         /home/matzew/go/src/github.com/llamastack/llama-stack-k8s-operator/tests/e2e/creation_test.go:227 +0x3c github.com/llamastack/llama-stack-k8s-operator/tests/e2e.TestCreationSuite.func2(0xc000502c40?)         /home/matzew/go/src/github.com/llamastack/llama-stack-k8s-operator/tests/e2e/creation_test.go:33 +0x1a testing.tRunner(0xc000502c40, 0xc0004a25e0)         /usr/local/go/src/testing/testing.go:1792 +0xf4 created by testing.(*T).Run in goroutine 98         /usr/local/go/src/testing/testing.go:1851 +0x413 FAIL    github.com/llamastack/llama-stack-k8s-operator/tests/e2e        120.068s FAIL make: *** [Makefile:129: test-e2e] Error 1 ``` Re-running the test had no issue, hence looked like an issue with little to low `timeout`. After tweaking the `test_utils` and increasing the timeout a little further, the test _directly_ passed on a fresh/cold machine as well. Below is the trace of the relevant part, that shows passing: ``` --- PASS: TestE2E/creation (245.10s) --- PASS: TestE2E/creation/should_create_LlamaStackDistribution (170.04s) --- PASS: TestE2E/creation/should_create_PVC_if_storage_is_configured (0.00s) --- PASS: TestE2E/creation/should_handle_direct_deployment_updates (5.02s) --- PASS: TestE2E/creation/should_check_health_status (60.03s) --- PASS: TestE2E/creation/should_update_deployment_through_CR (10.01s) --- PASS: TestE2E/creation/should_update_distribution_status (0.00s) --- PASS: TestE2E/deletion (10.02s) --- PASS: TestE2E/deletion/should_delete_LlamaStackDistribution_CR_and_cleanup_resources (10.02s) PASS ok github.com/llamastack/llama-stack-k8s-operator/tests/e2e 255.159s ``` Approved-by: leseb
1 parent 924a9ee commit ed504fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/e2e/test_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
const (
3030
ollamaNS = "ollama-dist"
3131
pollInterval = 10 * time.Second
32-
ResourceReadyTimeout = 2 * time.Minute
32+
ResourceReadyTimeout = 5 * time.Minute
3333
generalRetryInterval = 5 * time.Second
3434
)
3535

0 commit comments

Comments
 (0)