예제 #1
0
 public void testPollDuration() throws Exception {
   TimeBase.setSimulated(TimeBase.nowMs());
   V3LcapMessage src = this.makePollMessage(6 * Constants.WEEK);
   InputStream srcStream = src.getInputStream();
   V3LcapMessage copy = new V3LcapMessage(srcStream, tempDir, theDaemon);
   assertEqualMessages(src, copy);
   assertEquals(6 * Constants.WEEK, copy.getDuration());
 }
예제 #2
0
 private V3LcapMessage makePollMessage(long duration) {
   V3LcapMessage msg =
       new V3LcapMessage(
           "ArchivalID_2",
           "key",
           "Plug42",
           m_testBytes,
           m_testBytes,
           V3LcapMessage.MSG_POLL,
           TimeBase.nowMs() + duration,
           m_testID,
           tempDir,
           theDaemon);
   return msg;
 }