Add test for keeping work after rpc client timeout
Add more tests
Merge branch '0.5'