Testing and running - PanDAWMS/panda-harvester GitHub Wiki
Tests
First setup environment variables.
$ source etc/sysconfig/panda_harvester
All log files are available in the logdir which is defined in etc/panda/panda_common.cfg. The filename is panda-ClassName.log where ClassName is a plug-in or agent class name.
Unit tests
- Testing the local database and connection to PanDA
$ python lib/python*/site-packages/pandaharvester/harvestertest/basicTest.py
- Testing submission and monitoring with the batch system
$ python lib/python*/site-packages/pandaharvester/harvestertest/submitterTest.py [PandaQueueName]
- Testing stage-in
python lib/python*/site-packages/pandaharvester/harvestertest/stageInTest.py [PandaQueueName]
- Testing stage-out
python lib/python*/site-packages/pandaharvester/harvestertest/stageOutTest.py [PandaQueueName]
Functional tests
Harvester runs multiple threads in parallesl so that debugging is rather complicated. However, functions can be gradually executed by using
$ python lib/python*/site-packages/pandaharvester/harvesterbody/master.py --pid $PWD/tmp.pid --single
Run
Start daemon
$ python lib/python*/site-packages/pandaharvester/harvesterbody/master.py --pid $PWD/tmp.pid
Stop deamon
$ kill -USR2 `cat $PWD/tmp.pid`
If you have init.d script
$ etc/rc.d/init.d/panda_harvester start
$ etc/rc.d/init.d/panda_harvester stop