String[] command = new String[] {
"tail", "-f", "-n 1000", testFile
};
ProcessHolder processHolderFive = new ProcessHolder(command, 5);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
}
processHolderFive.cancle();
try {
Thread.sleep(100);
} catch (InterruptedException e) {
}
processHolderFive.cancle();
while (!processHolderFive.isDone()) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
}
}
Marker marker = new IndexedMarkerState(25).applyState(processHolderFive.makeMarker());
if (marker.next()) {
assertEquals('M', marker.toString().charAt(0));
}