@@ -170,7 +170,7 @@ else. We really just want to see if it's in the right ballpark."
170
170
provider
171
171
" Paris"
172
172
(lambda (response )
173
- (should (eq (current-buffer ) buf))
173
+ (should (or ( not ( buffer-live-p buf)) ( eq (current-buffer ) buf) ))
174
174
(setq result response))
175
175
(lambda (error )
176
176
(error " Error: %s " error )))
@@ -196,7 +196,7 @@ else. We really just want to see if it's in the right ballpark."
196
196
provider
197
197
'(" Paris" " France" )
198
198
(lambda (response )
199
- (should (eq (current-buffer ) buf))
199
+ (should (or ( not ( buffer-live-p buf)) ( eq (current-buffer ) buf) ))
200
200
(setq result response))
201
201
(lambda (error )
202
202
(error " Error: %s " error )))
@@ -223,7 +223,7 @@ else. We really just want to see if it's in the right ballpark."
223
223
provider
224
224
(llm-make-chat-prompt llm-integration-test-chat-prompt)
225
225
(lambda (response )
226
- (should (eq (current-buffer ) buf))
226
+ (should (or ( not ( buffer-live-p buf)) ( eq (current-buffer ) buf) ))
227
227
(setq result response))
228
228
(lambda (_ err )
229
229
(setq err-result err)))
@@ -244,16 +244,17 @@ else. We really just want to see if it's in the right ballpark."
244
244
provider
245
245
(llm-make-chat-prompt llm-integration-test-chat-prompt)
246
246
(lambda (partial-response )
247
- (should (eq (current-buffer ) buf))
247
+ (should (or ( not ( buffer-live-p buf)) ( eq (current-buffer ) buf) ))
248
248
(setq streamed-result (concat streamed-result partial-response)))
249
249
(lambda (response )
250
- (should (eq (current-buffer ) buf))
250
+ (should (or ( not ( buffer-live-p buf)) ( eq (current-buffer ) buf) ))
251
251
(setq returned-result response))
252
252
(lambda (_ err )
253
253
(setq err-result err)))
254
- (while (and (null returned-result)
254
+ (while (and (or (null returned-result)
255
+ (= (length streamed-result) 0 ))
255
256
(null err-result)
256
- (time-less-p (time-subtract (current-time ) start-time) 10 ))
257
+ (time-less-p (time-subtract (current-time ) start-time) 60 ))
257
258
(sleep-for 0.1 ))
258
259
(if err-result (error err-result))
259
260
(should (llm-integration-test-string-eq llm-integration-test-chat-answer (string-trim returned-result)))
0 commit comments