Order sendable messages by timestamp. Also fixed some comments.

This commit is contained in:
akwizgran
2011-09-07 15:55:03 +01:00
parent bbf957cc94
commit 39be97a4d6
5 changed files with 10 additions and 12 deletions

View File

@@ -68,7 +68,7 @@ public class ConstantsTest extends TestCase {
// Check that no more batch IDs can be written
assertFalse(a.writeBatchId(new BatchId(TestUtils.getRandomId())));
a.finish();
// Check the size of the ack
// Check the size of the serialised ack
assertTrue(out.size() > UniqueId.LENGTH * Ack.MAX_IDS_PER_ACK);
assertTrue(out.size() <= ProtocolConstants.MAX_PACKET_LENGTH);
}
@@ -117,7 +117,7 @@ public class ConstantsTest extends TestCase {
// Check that no more message IDs can be written
assertFalse(o.writeMessageId(new MessageId(TestUtils.getRandomId())));
o.finish();
// Check the size of the offer
// Check the size of the serialised offer
assertTrue(out.size() > UniqueId.LENGTH * Offer.MAX_IDS_PER_OFFER);
assertTrue(out.size() <= ProtocolConstants.MAX_PACKET_LENGTH);
}