I am able to get TestMRJobsWithProfiler#testDifferentProfilers to fail consistently on my Mac. However, I am not able to get it to fail on my Linux box or on either box when running testDefaultProfiler. On my mac, I have found that the problem is with the hprof option "times" in TestMRJobsWithProfiler.java:137 (-agentlib:hprof=cpu=times,heap=sites,force=n,thread=y,verbose=n," + "file=%s). This is causing the JVM to screw up and fail seemingly before it even begins to start the container.
Additionally, the "times" option is incredibly expensive and slows the JVM down a ton, making the test very likely to timeout on a busy Jenkins instance given the 150 second test timeout. IMO using "samples" instead of "times" would be much better. Using samples, the test passes on my mac and speeds the test up by almost 2x (74.8s vs. 145.5s on my Linux machine). Using "samples" would get rid of the hprof error on my mac and also speed up the test considerably, reducing the chance of test timeouts.
Is there any reason that we can't use "samples" instead of "times" for the profiler?