Skip to content

Commit efb53af

Browse files
author
Frank Natividad
committed
Updating can list log entries to wait for entries
1 parent ca030e3 commit efb53af

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

logging/spec/sample_spec.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,14 @@ def cleanup!
137137
allow(@logging).to receive(:entries).
138138
with(filter: %{resource.type = "gae_app"}).
139139
and_wrap_original do |m, *args|
140-
m.call(
141-
filter: %{logName = "#{my_application_log_name}"},
142-
order: "timestamp desc"
143-
)
140+
entries = []
141+
142+
wait_until {
143+
entries = m.call(filter: %Q{logName="#{my_application_log_name}"})
144+
entries.any?
145+
}
146+
147+
entries
144148
end
145149

146150
timestamp = "\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2} [^\\\\]+"

0 commit comments

Comments
 (0)