(t *testing.T)
| 284 | func bigStr() string { return strings.Repeat("x", 40000) } |
| 285 | |
| 286 | func 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 | |
| 306 | func TestControlledSelector_PingCandidate_BuildError(t *testing.T) { |
| 307 | a := bareAgentForPing() |
nothing calls this directly
no test coverage detected
searching dependent graphs…