various test fixes and improvements
Merge pull request #2664 from sebv/master

Various test fixes and improvements
ci ios branch for build #4599.2