33 Commits

Author SHA1 Message Date
Sean DuBois
f32c107a62 Update lint rules, force testify/assert for tests
Use testify's assert package instead of the standard library's testing
package.
2025-04-22 23:36:32 -04:00
Joe Turki
cad1676659 Upgrade golangci-lint, more linters
Introduces new linters, upgrade golangci-lint to version (v1.63.4)
2025-01-17 08:21:15 -06:00
Sean DuBois
39c90d8419 Upgrade dtls, turn and sturn
New major version of dtls causes API breaks on three packages
2024-08-12 11:43:44 -04:00
Eric Daniels
def1670796 Clean up Agents in tests more aggressively 2024-07-25 16:31:21 -04:00
Sean DuBois
85a3a7f524 Simplify usage of test.TimeOut()
Execute directly instead of allocating function
2024-03-23 20:28:47 -04:00
Sean DuBois
01c35354b0 Simplify usage of test.CheckRoutines()
Execute directly instead of allocating function
2024-03-23 20:08:57 -04:00
Steffen Vogel
05ab684741 Use testify/require instead of testify/assert
Don't continue to run a test if it has already failed
2024-03-23 07:42:06 -04:00
Sean DuBois
2d7ced1d49 Fix linter errors
golangci-lint upgrade to v1.56.2 added more checks

Relates to pion/.goassets#201
2024-03-15 22:25:46 -04:00
renovate[bot]
8d69e9ecd8 Update module github.com/pion/stun to v2
Generated by renovateBot
2023-09-08 14:25:52 -04:00
renovate[bot]
d21edf9690 Start pion/ice@v3
This is required to update pion/transport/v2 to v3

The public API of transport changed, and we expose transport as part of
our public API.
2023-09-03 23:51:36 -04:00
Steffen Vogel
ca9de18fd6 Move URL type to pion/stun.URI 2023-05-10 16:33:20 +02:00
Steffen Vogel
f40dd65abb Fix comment capitalization
Comments should start with an uppercase letter.
2023-04-18 19:38:54 +02:00
Steffen Vogel
5ef81b65f4 Make package REUSE compliant 2023-04-18 13:46:38 +02:00
Steffen Vogel
0194bd6ce8 Use new pion/transport Net interface
This change adapts pion/ice to use a new interface for most network
related operations. The interface was formerly a simple struct vnet.Net
which was originally intended to facilicate testing. By replacing it
with an interface we have greater flexibility and allow users to hook
into the networking stack by providing their own implementation of
the interface.
2023-02-08 21:58:49 +01:00
Sean DuBois
9b523704bb Enable acceptAggressiveNomination by default
Always accept Aggressive Nominations by remote agent

Relates to 18f7a214aa
2022-04-22 15:12:20 -04:00
Kyle Carberry
c7f5f6e56c Expose CheckInterval on AgentConfig
Allow users to configure how often internal task loop runs
2021-05-16 12:03:06 -07:00
Pion
d3e1775d73 Update CI configs to v0.4.7
Update lint scripts and CI configs.
2020-09-26 08:54:24 -07:00
Atsushi Watanabe
b2fbb12d0a Run TestRemoteLocalAddr in VNet
Avoid being affected by bridged network interfaces.
2020-07-05 22:23:59 -07:00
Atsushi Watanabe
66ad7f1218 Fix data race in TestWriteUseValidPair
Variable err is unexpectedly captured by goroutine.
2020-07-05 22:22:46 -07:00
Sam Lancia
a4a53ab443 Agent: Frequent candidate check when connecting
Previously in the connecting phase, a gathered peer reflexive candidate
which is by default nominated after 500mS, would have to wait 2s
(default taskLoopInterval) before being nominated.
2020-07-05 17:45:01 +09:00
Sean DuBois
bd57bd814c Make Credential getters thread safe
GetRemoteUserCredentials and GetLocalUserCredentials were
not thread safe. This puts them both behind a .run
2020-06-29 19:37:25 -07:00
Atsushi Watanabe
47186b5abd Fix timeout check order
Timeout check must be inside the scope of routine leak check.
Routine leak check internally has wait for routine exit which
may causes timeout error in some case.
2020-06-26 11:16:59 -07:00
Sean DuBois
3b47033146 Remove non-trickle ICE
pion/webrtc@v3 will be trickle by default, so removing
support from here.  Users can easily simulate non-trickle
by setting a OnICECandidate callback.

This just reduces the amount of things we need to test/worry about.
2020-06-25 00:16:58 -07:00
Sean DuBois
5a7603837b Set defaultKeepaliveInterval to 2 seconds
This should be lower then defaultDisconnectTimeout otherwise
we are going to enter disconnected.

Also rename defaultDisconnectTimeout -> defaultDisconnectedTimeout
to make the tense consistent with other options

Resolves #190
2020-06-25 00:16:58 -07:00
Sean DuBois
0c308ea365 Rename ConnectionTimeout -> DisconnectTimeout
ICE has two distinct states `Disconnected` and `Failed`. We need to
split out these arguments so that we can control (and test) both.

Relates to #190
2020-06-21 01:06:53 -07:00
Sean DuBois
a7be7f1607 Use best valid pair for Write
Before Write would only use the selected pair, now it also uses the best
valid pair. This behavior is specified in the RFC.

```
Before selected pairs have
been produced for a data stream, any valid pair associated with a
component of a data stream can be used for sending and receiving
data for the component
```

Resolves #187
2020-05-22 22:35:55 -07:00
Sean DuBois
b1fbbcc01e Don't unset the selected pair on timeout
The selected pair must NEVER be cleared. Instead we
should keep sending connectivity checks on it. If we go to failed the
user will then create a new PeerConnection or do an iceRestart.
In the future we may support nominations, but not standardized yet.

This test asserts that we can move from
Connected -> Disconnected -> Connected

Resolves #186
2020-05-22 22:35:55 -07:00
Atsushi Watanabe
384b91c787 Migrate test to turn/v2
Use turn v2 API in vnet based test.
2020-01-29 22:57:23 -08:00
Atsushi Watanabe
d001618082 Support WASM build/test
Some tests using net.Conn connection are disabled for now
as it is not fully supported by WASM MVP stage.
2020-01-13 08:51:13 +09:00
Sean DuBois
e161aa966e Update to pion/transport@v0.8.10
Tests now assert for routine leaks on startup as well
2019-10-31 09:54:40 -07:00
Yutaka Takeda
867a355033 Support 1:1 NAT option
Relates to pion/webrtc#835
2019-09-24 11:51:07 -07:00
Yutaka Takeda
c316a9f7b3 Fix lint errors
pion/webrtc#712
2019-07-15 01:00:21 -07:00
Hugo Arregui
b3e05469f0 Add vnet support with the new pion/turn client
Relates to pion/webrtc#712
2019-07-15 01:00:21 -07:00