I'm not sure what the previous code was actually supposed to test.  A single mock request was being accessed by multiple threads, each of which was setting a value in a shared hash.  This is not threadsafe, and presumably only passed because of the GIL.  Looking at Travis it appears that this test has always failed on JRuby, and that was only masked because of the Rakefile issue.