Esempio n. 1
0
        public void Ok_if_fails_to_connect()
        {
            SetupPersistedPeers(50);
            _rlpxPeer.MakeItFail();
            _peerManager.Init();
            _peerManager.Start();

            Thread.Sleep(_travisDelay);
            Assert.AreEqual(0, _peerManager.ActivePeers.Count);
        }
Esempio n. 2
0
        public async Task Ok_if_fails_to_connect()
        {
            SetupPersistedPeers(50);
            _rlpxPeer.MakeItFail();
            _peerManager.Init();
            _peerManager.Start();


            for (int i = 0; i < 10; i++)
            {
                Thread.Sleep(500);
                Assert.AreEqual(0, _peerManager.ActivePeers.Count);
            }

            await _peerManager.StopAsync();
        }