Skip to content

Commit

Permalink
(temp) Try to spec test without sleep(1)
Browse files Browse the repository at this point in the history
  • Loading branch information
natemccurdy committed Nov 15, 2023
1 parent 37c4da9 commit 13f302a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions spec/unit/face/generate_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,7 @@ module Puppet
Puppet::FileSystem.mkpath(puppet_x_lib)
genface.types
stats_before = [Puppet::FileSystem.stat(File.join(outputdir, 'test1.pp')), Puppet::FileSystem.stat(File.join(outputdir, 'test2.pp'))]
# Sorry. The sleep is needed because Puppet::FileSystem.touch(<path>, :mtime => Time.now + 1000) doesn't work on Windows.
sleep(1)
Puppet::FileSystem.touch(puppet_x_lib)
Puppet::FileSystem.touch(puppet_x_lib, :mtime => Time.now + 1000)
genface.types
stats_after = [Puppet::FileSystem.stat(File.join(outputdir, 'test1.pp')), Puppet::FileSystem.stat(File.join(outputdir, 'test2.pp'))]
expect(stats_before <=> stats_after).to eq(-1)
Expand Down

0 comments on commit 13f302a

Please sign in to comment.