mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 05:27:38 +03:00
2010-08-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten ut_pex peer selection. * src/DefaultBtInteractive.cc * src/DefaultPeerStorage.cc * src/DefaultPeerStorage.h * src/PeerStorage.h * src/UTPexExtensionMessage.h * test/DefaultPeerStorageTest.cc * test/MockPeerStorage.h * test/UTPexExtensionMessageTest.cc
This commit is contained in:
parent
2bd5020f81
commit
2176b68116
9 changed files with 71 additions and 20 deletions
|
@ -228,7 +228,7 @@ void UTPexExtensionMessageTest::testAddDroppedPeer()
|
|||
void UTPexExtensionMessageTest::testFreshPeersAreFull()
|
||||
{
|
||||
UTPexExtensionMessage msg(1);
|
||||
CPPUNIT_ASSERT_EQUAL((size_t)30, msg.getMaxFreshPeer());
|
||||
CPPUNIT_ASSERT_EQUAL((size_t)50, msg.getMaxFreshPeer());
|
||||
msg.setMaxFreshPeer(2);
|
||||
SharedHandle<Peer> p1(new Peer("192.168.0.1", 6881));
|
||||
CPPUNIT_ASSERT(msg.addFreshPeer(p1));
|
||||
|
@ -244,7 +244,7 @@ void UTPexExtensionMessageTest::testFreshPeersAreFull()
|
|||
void UTPexExtensionMessageTest::testDroppedPeersAreFull()
|
||||
{
|
||||
UTPexExtensionMessage msg(1);
|
||||
CPPUNIT_ASSERT_EQUAL((size_t)10, msg.getMaxDroppedPeer());
|
||||
CPPUNIT_ASSERT_EQUAL((size_t)50, msg.getMaxDroppedPeer());
|
||||
msg.setMaxDroppedPeer(2);
|
||||
SharedHandle<Peer> p1(new Peer("192.168.0.1", 6881));
|
||||
p1->startBadCondition();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue