MCPcopy Create free account
hub / github.com/facebook/time / TestSourceHandshakeWriteError

Function TestSourceHandshakeWriteError

ntrip/client_test.go:129–142  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

127}
128
129func TestSourceHandshakeWriteError(t *testing.T) {
130 client, server := net.Pipe()
131 server.Close() // Close immediately to cause write error.
132
133 ntripClient := NewClient(Config{
134 Caster: "caster.example.com:2101",
135 Mountpoint: "/MOUNT01",
136 Password: "secret",
137 })
138
139 err := ntripClient.sourceHandshake(client)
140 require.Error(t, err)
141 require.Contains(t, err.Error(), "sending SOURCE request")
142}
143
144func TestPostHandshakeRequestFormat(t *testing.T) {
145 client, server := net.Pipe()

Callers

nothing calls this directly

Calls 4

sourceHandshakeMethod · 0.95
NewClientFunction · 0.70
CloseMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…