Skip to content

Commit

Permalink
Debugging test failure on Cloudbees.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Mar 6, 2015
1 parent def3451 commit 034c7cd
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions spec/java_integration/utilities/jar_glob_spec.rb
Expand Up @@ -98,13 +98,21 @@ def jar_entries(full_entries)
jar_path = File.join(Dir.pwd, 'glob_test', 'modified-glob-test.jar')
FileUtils.cp 'glob-test.jar', jar_path

lambda do
# Need to sleep a little bit to make sure that modified time is updated
sleep 2
before = Dir.glob("#{jar_path}!/**/*").size

# This should delete the /glob_target and /glob_target/bar.txt entries
`zip -d #{jar_path} glob_target/bar.txt`
end.should change { Dir.glob("#{jar_path}!/**/*").size }.by -2
puts File.mtime(jar_path)

# Need to sleep a little bit to make sure that modified time is updated
sleep 2

# This should delete the /glob_target and /glob_target/bar.txt entries
`zip -d #{jar_path} glob_target/bar.txt`

puts File.mtime(jar_path)

after = Dir.glob("#{jar_path}!/**/*").size

expect(after - before).to eq(-2)
end
end

Expand Down

0 comments on commit 034c7cd

Please sign in to comment.