Index: /main/waeup.kofa/branches/uli-zc-async/src/waeup/kofa/async.py
===================================================================
--- /main/waeup.kofa/branches/uli-zc-async/src/waeup/kofa/async.py	(revision 9101)
+++ /main/waeup.kofa/branches/uli-zc-async/src/waeup/kofa/async.py	(revision 9102)
@@ -35,9 +35,11 @@
     )
 
-def compute(num):
+def compute(num, duration=60):
     """A convenience function to test asynchronous jobs.
+
+    `duration` gives the seconds, this job should (artificially) need
+    for completing.
     """
     start = time.time()
-    duration = 60
     end = start + duration
     print "MyJob starts computation at ", start
@@ -60,4 +62,5 @@
         print "MyJob's percent: %r" % zc.async.local.getLiveAnnotation(
             'percent')
+    zc.async.local.setLiveAnnotation('percent', 100.0)
     return num * 2
 
@@ -70,5 +73,4 @@
     grok.implements(IJob, IProgressable)
     grok.provides(IJob)
-
     percent = None
 
@@ -183,5 +185,5 @@
         return
 
-    def start_test_job(self):
+    def start_test_job(self, duration=60, site=None):
         """Start a test job.
 
@@ -190,6 +192,6 @@
         :func:`compute` function with ``23`` as argument.
         """
-        job = AsyncJob(compute, 23)
-        job_id = self.put(job)
+        job = AsyncJob(compute, 23, duration)
+        job_id = self.put(job, site=site)
         return job_id
 
