The interwebs all claimed setting
-Djava.awt.headless=truewould resolve the issue but it did nothing for us. We set it as a Jenkins system parameter, in the launchctl job, in the bash_profile of the Jenkins user on the machine, and everywhere we could in the Jenkins job itself....to no avail.
Just before heading down the path of setting it programatically somewhere in our test stack - I noticed that our maven-surefire-plugin was configured to use a threadCount of 10. On a hunch that maven-surefire-plugin was not exporting my system properties to the new threads it spawned for the test run - I configured the plugin to set java.awt.headless with the following snip from our pom.xml