MCPcopy Create free account
hub / github.com/pion/ice / TestControllingSelector_PingCandidate_BuildError

Function TestControllingSelector_PingCandidate_BuildError

selection_test.go:286–304  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

284func bigStr() string { return strings.Repeat("x", 40000) }
285
286func TestControllingSelector_PingCandidate_BuildError(t *testing.T) {
287 a := bareAgentForPing()
288 // make Username really big so stun.Build returns an error.
289 a.remoteUfrag = bigStr()
290 a.localUfrag = bigStr()
291 a.remotePwd = selectionTestPassword
292 a.tieBreaker = 1
293
294 testLogger := &testICELogger{}
295 sel := &controllingSelector{agent: a, log: testLogger}
296 sel.Start()
297
298 local := newPingNoIOCand()
299 remote := newPingNoIOCand()
300
301 sel.PingCandidate(local, remote)
302
303 require.NotEmpty(t, testLogger.lastErrorMessage, "expected error to be logged from stun.Build")
304}
305
306func TestControlledSelector_PingCandidate_BuildError(t *testing.T) {
307 a := bareAgentForPing()

Callers

nothing calls this directly

Calls 5

StartMethod · 0.95
PingCandidateMethod · 0.95
bareAgentForPingFunction · 0.85
bigStrFunction · 0.85
newPingNoIOCandFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…