Skip to content

Commit 034c7cd

Browse files
committed
Debugging test failure on Cloudbees.
1 parent def3451 commit 034c7cd

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

spec/java_integration/utilities/jar_glob_spec.rb

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,21 @@ def jar_entries(full_entries)
9898
jar_path = File.join(Dir.pwd, 'glob_test', 'modified-glob-test.jar')
9999
FileUtils.cp 'glob-test.jar', jar_path
100100

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

105-
# This should delete the /glob_target and /glob_target/bar.txt entries
106-
`zip -d #{jar_path} glob_target/bar.txt`
107-
end.should change { Dir.glob("#{jar_path}!/**/*").size }.by -2
103+
puts File.mtime(jar_path)
104+
105+
# Need to sleep a little bit to make sure that modified time is updated
106+
sleep 2
107+
108+
# This should delete the /glob_target and /glob_target/bar.txt entries
109+
`zip -d #{jar_path} glob_target/bar.txt`
110+
111+
puts File.mtime(jar_path)
112+
113+
after = Dir.glob("#{jar_path}!/**/*").size
114+
115+
expect(after - before).to eq(-2)
108116
end
109117
end
110118

0 commit comments

Comments
 (0)