(t *testing.T)
| 677 | } |
| 678 | |
| 679 | func 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 | |
| 689 | func TestWaitForTCPPortCancellation(t *testing.T) { |
| 690 | ctx, cancel := context.WithCancel(context.Background()) |
nothing calls this directly
no test coverage detected