apcera/nats — pull request #39 by fraenkel (2014-11-02 18:10:04+00:00)
Title: Add a client ping

Periodically send a client ping
If it fails, follow the reconnect process

The testing isn't overly complete but did highlight a few data races and other issues that were either fixed in the NATS client (waitgroup) or in the test (reconnect when closed).

While this test is almost identical to TestHotSpotReconnect, the major difference is in the overall execution time. HotSpot will either finish fast or at the 1 minute mark. This test always finishes approximately 3x the client ping interval.