Improve test failure message for #1390.
Improve error message further.
Add special hook to diagnose travis failing test.
Remove flaky test.

Fixes #1390
Merge pull request #1391 from sbt/wip/1390

Improve test failure message for #1390.