Merge pull request #2622 from sebv/master

Refactored/fixed uicatalog/gestures tests
fixing tests
mitigating against redundant/late session closing