File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,11 @@ def run_slice(slice_id=nil)
286
286
end
287
287
288
288
router . emit_stream ( @tag , es )
289
- client . clear_scroll ( scroll_id : scroll_id ) if scroll_id
289
+ if Gem ::Version . new ( Elasticsearch ::VERSION ) >= Gem ::Version . new ( "7.0.0" )
290
+ client . clear_scroll ( body : { scroll_id : scroll_id } ) if scroll_id
291
+ else
292
+ client . clear_scroll ( scroll_id : scroll_id ) if scroll_id
293
+ end
290
294
end
291
295
292
296
def process_scroll_request ( scroll_id )
Original file line number Diff line number Diff line change @@ -463,9 +463,14 @@ def test_emit_with_size
463
463
headers : { 'Content-Type' => 'application/json' , 'X-elastic-product' => 'Elasticsearch' } }
464
464
end
465
465
end )
466
- stub_request ( :delete , "http://localhost:9200/_search/scroll/WomkoUKG0QPB679Ulo6TqQgh3pIGRUmrl9qXXGK3EeiQh9rbYNasTkspZQcJ01uz" ) .
466
+ if Gem ::Version . new ( Elasticsearch ::VERSION ) >= Gem ::Version . new ( "7.0.0" )
467
+ stub_request ( :delete , "http://localhost:9200/_search/scroll" ) .
468
+ with ( body : "{\" scroll_id\" :\" WomkoUKG0QPB679Ulo6TqQgh3pIGRUmrl9qXXGK3EeiQh9rbYNasTkspZQcJ01uz\" }" ) .
467
469
to_return ( status : 200 , body : "" , headers : { } )
468
-
470
+ else
471
+ stub_request ( :delete , "http://localhost:9200/_search/scroll/WomkoUKG0QPB679Ulo6TqQgh3pIGRUmrl9qXXGK3EeiQh9rbYNasTkspZQcJ01uz" ) .
472
+ to_return ( status : 200 , body : "" , headers : { } )
473
+ end
469
474
driver ( CONFIG + %[size 1] )
470
475
driver . run ( expect_emits : 1 , timeout : 10 )
471
476
expected = [
You can’t perform that action at this time.
0 commit comments