Skip to content

Commit

Permalink
Merge pull request #634 from nik9000/fix_test
Browse files Browse the repository at this point in the history
Make a test in ClientTest more consistent
  • Loading branch information
ruflin committed Jun 13, 2014
2 parents 551bd0c + 13242b9 commit 7b34a8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
CHANGES

2014-06-13
- Stop ClientTest->testDeleteIdsIdxStringTypeString from failing 1/3 of the time #634

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

Expand Down
6 changes: 3 additions & 3 deletions test/lib/Elastica/Test/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ public function testDeleteIdsIdxStringTypeString()

// Adds 1 document to the index
$doc = new Document(null, $data);
$doc->setRouting(1);
$result = $type->addDocument($doc);

// Refresh index
Expand All @@ -291,9 +292,8 @@ public function testDeleteIdsIdxStringTypeString()
$this->assertEquals(true, is_string($idxString));
$this->assertEquals(true, is_string($typeString));


// Try to delete doc with a routing value different from _id
// which should fail to delete any docs
// Try to delete doc with a routing value which hashes to
// a different shard then the id.
$resp = $index->getClient()->deleteIds($ids, $index, $type, 2);

// Refresh the index
Expand Down

0 comments on commit 7b34a8d

Please sign in to comment.