There are a number of tests that fork to simulate contention behavior. On Windows however, we punt on these since Ruby's fork is unsupported on Windows.
Ruby 1.9.3 added `spawn`, and while this is not the same thing as `fork`, in instances where we need to simulate file locking behavior for the sake of tests, this might be a reasonable substitute.
A recent pull has landed for Puppet::Util::Lockfile that attempts to fix a race condition:
However, there are no Windows tests, and a cross-platform helper would certainly be convenient to add here.