You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This test verifies that the deleteSandbox handler correctly handles scenarios where the client disconnects (Context Cancellation) before the deletion operation completes.
481
+
482
+
Key Points:
483
+
484
+
The handler creates a new context for the K8s deletion operation using context.WithTimeout(ctx, deletionTimeout).
485
+
This derived context remains valid even if the parent context (c.Request.Context()) is canceled.
486
+
The test simulates a client disconnect by canceling the request context immediately after calling the deleteSandbox function.
487
+
It verifies that the store deletion (the final cleanup step) still occurs by checking that the store's DeleteSandboxBySessionID method was called with a valid, non-canceled context.
0 commit comments