MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / TestWaitForTCPPortTimeout

Function TestWaitForTCPPortTimeout

utils/ssh_test.go:679–687  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

677}
678
679func TestWaitForTCPPortTimeout(t *testing.T) {
680 // Use a port that's definitely not listening
681 ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
682 defer cancel()
683
684 err := WaitForTCPPort(ctx, "127.0.0.1", 65500, 1*time.Second)
685 require.Error(t, err)
686 assert.Contains(t, err.Error(), "not available")
687}
688
689func TestWaitForTCPPortCancellation(t *testing.T) {
690 ctx, cancel := context.WithCancel(context.Background())

Callers

nothing calls this directly

Calls 2

WaitForTCPPortFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected