chunks.start();
assertEquals(0, agent.adaptorCount());
File testFile = makeTestFile("testDA", 50, new File(System.getProperty("test.build.data", "/tmp")));
long len = testFile.length();
System.out.println("wrote data to " + testFile);
AdaptorResetThread restart = new AdaptorResetThread(conf, agent);
//start timeout thread
agent.processAddCommand("add fta = "+ FileTailingAdaptor.class.getCanonicalName()
+ " testdata " + testFile.getCanonicalPath() + " 0" );
assertEquals(1, agent.adaptorCount());
Chunk c1 = chunks.waitForAChunk();
assertNotNull(c1);
List<CommitListEntry> pendingAcks = new ArrayList<CommitListEntry>();
pendingAcks.add(new DelayedCommit(c1.getInitiator(), c1.getSeqID(),
c1.getData().length, "foo", c1.getSeqID(), agent.getAdaptorName(c1.getInitiator())));
restart.reportPending(pendingAcks);
assertEquals(len, c1.getData().length);
Thread.sleep(ACK_TIMEOUT*2);
int resetCount = restart.resetTimedOutAdaptors(ACK_TIMEOUT);
Chunk c2 = chunks.waitForAChunk(1000);
assertNotNull(c2);
assertEquals(len, c2.getData().length);
assertTrue(resetCount > 0);
agent.shutdown();