Rewrite Connection tests for aborting requests with observable emission
Created by: lguychard
Related issue: #1190 (closed)
Simplifies Connection
unit test re: aborting requests with observable emission, as per @felixfbecker's comment (thanks!)
@felixfbecker's suggested test failed consistently, because it subscribed to observeRequest()
and unsubscribed from the returned Observable in the same tick, while Connection
processes messages on the next tick, except in the special case of aborting requests that have not yet been handled.
Fixed the suggested test to call unsubscribe()
on the next tick, and added another test for synchronously aborting requests that have not yet been handled.