SBT warning: Getting the hostname was slow

I just started using a new version of SBT, and when I went to run a test I got this SBT warning message:

[warn] Getting the hostname Alvins-MacBook-Pro.local was slow (5003.850955 ms).
This is likely because the computer's hostname is not set.
You can set the hostname with the command:
  scutil --set HostName $(scutil --get LocalHostName).

I thought that was a bizarre message to come from a tool like SBT — why does it have to do a hostname lookup for a local test? — but as you can see from this commit on Github, this is intentionally done, and the warning message is intentionally added.

After doing a little more research (like this page) I went ahead and ran the scutil command shown and the warning message went away.