Skip to content

Commit a95e85e

Browse files
author
Nik Everett
committed
Stop ScanAndScrollTest from failing spuriously
ScanAndScrollTest->testQuerySizeOverride used the rewind method on ScanAndScroll which executes a scroll query on Elasticsearch without making sure that the index is fully allocated. Apparently, this can cause Elasticsearch to throw back an error. We work around this by adding a refresh before the rewind.
1 parent 7b34a8d commit a95e85e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

changes.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ CHANGES
22

33
2014-06-13
44
- Stop ClientTest->testDeleteIdsIdxStringTypeString from failing 1/3 of the time #634
5+
- Stop ScanAndScrollTest->testQuerySizeOverride from failing frequently for no reason #635
56

67
2014-06-11
78
- Allow bulk API deletes to be routed #631

test/lib/Elastica/Test/ScanAndScrollTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public function testQuerySizeOverride() {
2929
$query->setSize(100);
3030

3131
$index = $this->_createIndex('test_1');
32+
$index->refresh(); // Waits for the index to be fully created.
3233
$type = $index->getType('scanAndScrollTest');
3334

3435
$search = new Search($this->_getClient());

0 commit comments

Comments
 (0)