[qmtest] cPickle.UnpickleableError: Cannot pickle <type 'thread.lock'> objects
Sven Lundblad
svlu at enea.se
Thu Mar 6 18:43:49 UTC 2003
I have target classes that spawns a thread per instance that it
dispatches one test at a time to. This allows RunTest to return directly
back to the execution engine. My _RecordResult looks like this:
def _RecordResult(self, result):
"""Run after a test have been executed by __RunTests()."""
# Make us idle (idle is counted down when the scheduler
# posts a new Test in RunTest).
assert self.jobthread_id == thread.get_ident()
if(result.GetKind() == result.TEST):
self.lock.acquire()
self.idle = self.idle + 1
self.lock.release()
Target._RecordResult(self, result)
# End of _RecordResult
Mark Mitchell wrote:
> On Wed, 2003-03-05 at 10:20, Sven Lundblad wrote:
>
>>Hi all,
>>
>>While using qmtest 2.0.3, I get the following exception after the first
>>test has completed:
>>Traceback (most recent call last):
>> File
>>"/view/tb_task003419_svlu/vobs/ose/tefo/qm-2.0.3/lib/qm/qm/test/qmtest.py",
>>line 78, in ?
>> exit_code = command.Execute()
>> File "/lib/qm/qm/test/cmdline.py", line 569, in Execute
>> File "/lib/qm/qm/test/cmdline.py", line 1272, in __ExecuteRun
>> File "/lib/qm/qm/test/execution_engine.py", line 143, in Run
>> File "/lib/qm/qm/test/execution_engine.py", line 320, in
>>_CheckForResponse
>> File "/lib/qm/qm/test/execution_engine.py", line 450, in _AddResult
>> File "/lib/qm/qm/test/pickle_result_stream.py", line 43, in WriteResult
>>cPickle.UnpickleableError: Cannot pickle <type 'thread.lock'> objects
>>
>>I'm not sure what is going on here, to my knowledge I haven't put any
>>thread.lock objects into the result object. For some reason this worked
>>fine with qmtest 1.1.5. Any one that can shred some light on this?
>
>
> That's pretty weird. Are you running in threaded mode? Or do your test
> classes you threads?
>
> Thanks,
>
--
---
Sven Lundblad, OSE Systems, Tel. +46 8 50714221, Fax +46 8 50714090
More information about the qmtest
mailing list