refactoring postMessage tests and adding stress test for post messages