5 USES ServerLoop
,Chat
,SysUtils
,MemStream
,NetAddr
,opcode
,Download
,Store1
,sha1
;
12 procedure HardTimeout
;
17 write('TestFS: ',job
^.state
);
18 if job
^.state
>=stError
then write(job
^.error
,'-',job
^.error2
);
19 writeln(' total=',job
^.total
,' done=',job
^.done
,' miss=',job
^.missc
);
20 if job
^.state
<>stActive
then Rekt
else
21 Shedule(800,@Periodic
);
26 writeln('TestFS: rekt');
28 UnShedule(@HardTimeout
);
30 FreeMem(@self
,sizeof(self
));
33 procedure t
.HardTimeout
;
35 writeln('TestFS: hardtimeout');
48 assert(OptParamCount(oi
)=2,opt
+'(rcpt:tNetAddr fid:sha1)');
49 fid
:=tFID(paramstr(oi
+2));
50 writeln('TestFS: rcpt '+paramstr(oi
+1),' ',sha1print(fid
));
51 new(o
); with o
^ do begin
52 //Shedule(15000,@HardTimeout);
53 Shedule(20,@Periodic
);
54 job
:=NewJob(paramstr(oi
+1),fid
);
55 if job
^.state
=stStop
then job
^.Start
;