BATCH_ID and MESSAGE_ID don't need to be structs.

This commit is contained in:
akwizgran
2011-12-07 00:38:14 +00:00
parent b7c3224618
commit 495baf8c70
11 changed files with 65 additions and 95 deletions

View File

@@ -107,12 +107,10 @@ public class AckReaderTest extends TestCase {
Random random = new Random();
while(out.size() + BatchId.LENGTH + 3
< ProtocolConstants.MAX_PACKET_LENGTH) {
w.writeStructId(Types.BATCH_ID);
random.nextBytes(b);
w.writeBytes(b);
}
if(tooBig) {
w.writeStructId(Types.BATCH_ID);
random.nextBytes(b);
w.writeBytes(b);
}

View File

@@ -52,9 +52,9 @@ public class ProtocolWriterImplTest extends TestCase {
b.set(15);
Request r = packetFactory.createRequest(b, 16);
w.writeRequest(r);
// Short user tag 8, 0 as uint7, short bytes with length 2, 0xD959
// Short user tag 6, 0 as uint7, short bytes with length 2, 0xD959
byte[] output = out.toByteArray();
assertEquals("C8" + "00" + "92" + "D959",
assertEquals("C6" + "00" + "92" + "D959",
StringUtils.toHexString(output));
}
@@ -75,9 +75,9 @@ public class ProtocolWriterImplTest extends TestCase {
b.set(12);
Request r = packetFactory.createRequest(b, 13);
w.writeRequest(r);
// Short user tag 8, 3 as uint7, short bytes with length 2, 0x59D8
// Short user tag 6, 3 as uint7, short bytes with length 2, 0x59D8
byte[] output = out.toByteArray();
assertEquals("C8" + "03" + "92" + "59D8",
assertEquals("C6" + "03" + "92" + "59D8",
StringUtils.toHexString(output));
}
}