Inheritance diagram for Protocols::BitTorrent::Transfers::Testing::TransferSessionImplTest:


u/d speeds, snubbed flags
Definition at line 40 of file TransferSessionImplTest.cpp.
Public Member Functions | |
| TransferSessionImplTest () | |
| void | setUp () |
| void | tearDown () |
| void | refWeAreChoked (bool value) |
| void | refWeAreInterested (bool value) |
| void | refWeAreSnubbed (bool value, int secondsSinceLastReceived=0) |
| void | refWeAreSeeder (bool isSeeder) |
| void | refPeerIsChoked (bool value) |
| void | refPeerIsInterested (bool value) |
| void | refPeerIsSnubbed (bool value, int secondsSinceLastSent=0) |
| void | refPeerIsSeeder (bool isSeeder) |
| void | refTotalDownloadedIs (qint64 count) |
| void | refTotalUploadedIs (qint64 count) |
| void | refCurrentDownloadSpeedIs (qint64 speed, int secondsSinceLastReceive=0) |
| void | refCurrentUploadSpeedIs (qint64 speed, int secondsSinceLastSend=0) |
| void | refWePiecesAvailable (const QBitArray &pieces) |
| void | refPeerPiecesAvailable (const QBitArray &pieces) |
| void | refReceivedPacketFromPeer (Packet packet, int secondsSinceLastReceive=0) |
| void | refReceivedPacketFromPeerClosesSession (Packet packet) |
| void | refSentPacketToPeer (Packet packet, int secondsSinceLastSend=0) |
| void | testCorrectInitialState () |
| void | testWeGetChoked () |
| void | testWeGetUnchoked () |
| void | testWeGetUnchokedAndThenChokedAgain () |
| void | testChokePeer () |
| void | testUnchokePeer () |
| void | testUnchokePeerAndThenChokeItAgain () |
| void | testWeGetInterested () |
| void | testWeGetNotInterested () |
| void | testWeGetInterestedAndThenNotInterestedAgain () |
| void | testPeerGetsInterested () |
| void | testPeerGetsNotInterested () |
| void | testPeerGetsInterestedAndThenNotInterestedAgain () |
| void | testOnlyReceivingPieceIncreasesTotalDownload () |
| void | testOnlySendingPieceIncreasesTotalUpload () |
| void | testClosingTransferSessionClosesGenericSession () |
| void | testForwardsClosingAndClosedNotificationFromGenericSession () |
| void | testCurrentDownloadSpeedIsMovingAverageMoveTimeout () |
| void | testCurrentDownloadSpeedIsMovingAverageMoveEachSecond () |
| void | testCurrentUploadSpeedIsMovingAverageMoveTimeout () |
| void | testCurrentUploadSpeedIsMovingAverageMoveEachSecond () |
| void | testWeAreSnubbedIfPeerIsUnchokedButDoesNotReciprocate () |
| A peer considers itself snubbed if it does not get a Piece for a while. | |
| void | testPeerIsSnubbedIfWeAreUnchokedButDoNotReciprocate () |
| void | testReceivingABadPacketClosesSession () |
| void | testReceivingBitFieldSetsPeerPiecesAvailable () |
| void | testReceivingASecondBitFieldClosesSession () |
| void | testSendingBitFieldSetsWePiecesAvailable () |
| void | testReceivingHaveAllSetsAllPeerPiecesAvailable () |
| void | testReceivingASecondHaveAllClosesSession () |
| void | testSendingHaveAllSetsAllWePiecesAvailable () |
| void | testReceivingHaveNoneResetsAllPeerPiecesAvailable () |
| void | testReceivingASecondHaveNoneClosesSession () |
| void | testSendingHaveNoneResetsAllWePiecesAvailable () |
| void | testReceivingHavePacketSetsAPiecesAvailableBit () |
| void | testSendingHavePacketSetsAPiecesAvailableBit () |
| void | testPeerIsSeederIfItHasAllPieces () |
| void | testWeAreSeederIfItHaveAllPieces () |
| void | testPeerIsSeederAfterReportingItHasAllPieces () |
| void | testWeAreSeederAfterReportingWeHaveAllPieces () |
Private Member Functions | |
| CPPUNIT_TEST_SUITE (TransferSessionImplTest) | |
| CPPUNIT_TEST (testCorrectInitialState) | |
| CPPUNIT_TEST (testWeGetChoked) | |
| CPPUNIT_TEST (testWeGetUnchoked) | |
| CPPUNIT_TEST (testWeGetUnchokedAndThenChokedAgain) | |
| CPPUNIT_TEST (testChokePeer) | |
| CPPUNIT_TEST (testUnchokePeer) | |
| CPPUNIT_TEST (testUnchokePeerAndThenChokeItAgain) | |
| CPPUNIT_TEST (testWeGetInterested) | |
| CPPUNIT_TEST (testWeGetNotInterested) | |
| CPPUNIT_TEST (testWeGetInterestedAndThenNotInterestedAgain) | |
| CPPUNIT_TEST (testPeerGetsInterested) | |
| CPPUNIT_TEST (testPeerGetsNotInterested) | |
| CPPUNIT_TEST (testPeerGetsInterestedAndThenNotInterestedAgain) | |
| CPPUNIT_TEST (testOnlyReceivingPieceIncreasesTotalDownload) | |
| CPPUNIT_TEST (testOnlySendingPieceIncreasesTotalUpload) | |
| CPPUNIT_TEST (testClosingTransferSessionClosesGenericSession) | |
| CPPUNIT_TEST (testForwardsClosingAndClosedNotificationFromGenericSession) | |
| CPPUNIT_TEST (testCurrentDownloadSpeedIsMovingAverageMoveTimeout) | |
| CPPUNIT_TEST (testCurrentDownloadSpeedIsMovingAverageMoveEachSecond) | |
| CPPUNIT_TEST (testCurrentUploadSpeedIsMovingAverageMoveTimeout) | |
| CPPUNIT_TEST (testCurrentUploadSpeedIsMovingAverageMoveEachSecond) | |
| CPPUNIT_TEST (testWeAreSnubbedIfPeerIsUnchokedButDoesNotReciprocate) | |
| CPPUNIT_TEST (testPeerIsSnubbedIfWeAreUnchokedButDoNotReciprocate) | |
| CPPUNIT_TEST (testReceivingABadPacketClosesSession) | |
| CPPUNIT_TEST (testReceivingBitFieldSetsPeerPiecesAvailable) | |
| CPPUNIT_TEST (testReceivingASecondBitFieldClosesSession) | |
| CPPUNIT_TEST (testSendingBitFieldSetsWePiecesAvailable) | |
| CPPUNIT_TEST (testReceivingHaveAllSetsAllPeerPiecesAvailable) | |
| CPPUNIT_TEST (testReceivingASecondHaveAllClosesSession) | |
| CPPUNIT_TEST (testSendingHaveAllSetsAllWePiecesAvailable) | |
| CPPUNIT_TEST (testReceivingHaveNoneResetsAllPeerPiecesAvailable) | |
| CPPUNIT_TEST (testReceivingASecondHaveNoneClosesSession) | |
| CPPUNIT_TEST (testSendingHaveNoneResetsAllWePiecesAvailable) | |
| CPPUNIT_TEST (testReceivingHavePacketSetsAPiecesAvailableBit) | |
| CPPUNIT_TEST (testSendingHavePacketSetsAPiecesAvailableBit) | |
| CPPUNIT_TEST (testPeerIsSeederIfItHasAllPieces) | |
| CPPUNIT_TEST (testWeAreSeederIfItHaveAllPieces) | |
| CPPUNIT_TEST (testPeerIsSeederAfterReportingItHasAllPieces) | |
| CPPUNIT_TEST (testWeAreSeederAfterReportingWeHaveAllPieces) | |
| CPPUNIT_TEST_SUITE_END () | |
Private Attributes | |
| auto_ptr< SessionMock > | genericSession |
| auto_ptr< IntegerResetStopwatchMock > | downloadStopwatch |
| auto_ptr< IntegerResetStopwatchMock > | uploadStopwatch |
| auto_ptr< TransferSessionStatusMock > | sessionStatus |
| auto_ptr< TransferSessionImpl > | sessionReal |
| auto_ptr< TransferSessionImplDriver > | session |
| const Handshake | handshake |
| const BadPacket | badPacket |
| const Choke | choke |
| const Unchoke | unchoke |
| const Interested | interested |
| const NotInterested | notInterested |
| const Piece | piece1 |
| const Piece | piece2 |
| const Piece | piece3 |
| const BitField | bitField |
| const HaveAll | haveAll |
| const HaveNone | haveNone |
| const Have | have5 |
| const Have | have11 |
| const QBitArray | allPiecesAvailable |
| QBitArray | piecesAvailable |
| const QBitArray | noPiecesAvailable |
Static Private Attributes | |
| static const int | AverageLength = 20 |
| static const int | SnubbedTimeout = 60 |
|
|
Definition at line 113 of file TransferSessionImplTest.cpp. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Definition at line 220 of file TransferSessionImplTest.cpp. |
|
||||||||||||
|
Definition at line 231 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 182 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 188 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 202 of file TransferSessionImplTest.cpp. |
|
||||||||||||
|
Definition at line 194 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 247 of file TransferSessionImplTest.cpp. |
|
||||||||||||
|
Definition at line 253 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 274 of file TransferSessionImplTest.cpp. |
|
||||||||||||
|
Definition at line 285 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 208 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 214 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 156 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 162 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 176 of file TransferSessionImplTest.cpp. |
|
||||||||||||
|
Definition at line 168 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 241 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 132 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 146 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 344 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 430 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 307 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 466 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 451 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 500 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 485 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 438 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 399 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 415 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 381 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 393 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 387 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 649 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 635 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 539 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 550 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 561 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 579 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 597 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 555 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 573 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 591 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 609 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 567 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 585 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 603 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 622 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 351 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 357 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 665 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 642 of file TransferSessionImplTest.cpp. |
|
|
A peer considers itself snubbed if it does not get a Piece for a while. If we are not unchoked we cannot get snubbed.
Definition at line 528 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 325 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 363 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 375 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 369 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 332 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 338 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 108 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 84 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 95 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 103 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 96 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 88 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 87 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 94 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 107 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 106 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 104 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 105 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 98 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 110 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 99 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 100 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 101 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 102 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 109 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 92 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 91 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 90 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 85 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 97 of file TransferSessionImplTest.cpp. |
|
|
Definition at line 89 of file TransferSessionImplTest.cpp. |