File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 5757 }
5858 response = reindex . reindex ( body , requests_per_second : 0.01 , wait_for_completion : false )
5959 task_id = response [ "task" ]
60+ node_id = task_id . split ( ":" ) . first
61+ task_number = task_id . split ( ":" ) . last . to_i
6062
61- reindex . rethrottle ( task_id , requests_per_second : 1 )
63+ response = reindex . rethrottle ( task_id , requests_per_second : 1 )
6264
63- tasks = $client. tasks
64- node_id = task_id . split ( ":" ) . first
65- task_id = task_id . split ( ":" ) . last . to_i
65+ assert_equal 1 , response [ "nodes" ] [ node_id ] [ "tasks" ] [ task_id ] [ "status" ] [ "requests_per_second" ]
6666
6767 # wait for the task to complete
68- tasks . wait_by_id ( node_id , task_id , "30s" )
68+ tasks = $client. tasks
69+ tasks . wait_by_id ( node_id , task_number , "30s" )
6970
7071 # Verify that the document has been reindexed
7172 doc = @dest_index . docs . get ( id : 1 , type : "book" )
You can’t perform that action at this time.
0 commit comments