Fixes #3150 TestCustomHandler race condition (#3153)
Fixes #3150 TestCustomHandler race condition (#3153)

* Fixes #3150 : Select from channel in tests instead of sleep

* Make assertChannelLengthWithTimeout actually assert stuff

* Fix t.Fatal formatting and tidy if/else block

* Restore comment explaining why expected value is zero

couchbaselabs/sync_gateway,ceejatec/sync_gateway,ceejatec/sync_gateway,ceejatec/sync_gateway,couchbaselabs/sync_gateway,couchbaselabs/sync_gateway,ceejatec/sync_gateway,couchbaselabs/sync_gateway