Avoid interferences between tests using MemoryPeerDiscoveryTransport in different threads
This commit is contained in:
Родитель
86aa07451a
Коммит
53e445f01d
|
@ -62,9 +62,10 @@ namespace Microsoft.MixedReality.Sharing.Matchmaking.Test
|
|||
[Fact]
|
||||
public void ResourceExpiresOnTime()
|
||||
{
|
||||
var random = new Random();
|
||||
const int timeoutSec = 1;
|
||||
var network1 = new MemoryPeerDiscoveryTransport(1);
|
||||
var network2 = new MemoryPeerDiscoveryTransport(2);
|
||||
var network1 = new MemoryPeerDiscoveryTransport(random.Next());
|
||||
var network2 = new MemoryPeerDiscoveryTransport(random.Next());
|
||||
using (var cts = new CancellationTokenSource(Utils.TestTimeoutMs))
|
||||
using (var svc1 = new PeerDiscoveryAgent(network1))
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче