Permalink
Browse files

Fix Setting test for elasticsearch 0.20.1

  • Loading branch information...
ruflin committed Dec 16, 2012
1 parent 6d94d5e commit 3bcd162c1d45ebb8ff8a2161ff2c3e5906c8ff7a
Showing with 13 additions and 0 deletions.
  1. +3 −0 lib/Elastica/Search.php
  2. +10 −0 test/lib/Elastica/Cluster/SettingsTest.php
View
@@ -209,6 +209,9 @@ public function search($query, $options = null)
case 'limit' :
$query->setLimit($value);
break;
+ case 'explain':
+ $query->setExplain($value);
+ break;
case 'routing' :
case 'search_type':
case 'timeout':
@@ -6,6 +6,11 @@ class Elastica_Cluster_SettingsTest extends Elastica_Test
public function testSetTransient()
{
$index = $this->_createIndex();
+
+ if (count($index->getClient()->getCluster()->getNodes()) < 2) {
+ $this->markTestSkipped('At least two master nodes have to be running for this test');
+ }
+
$settings = new Elastica_Cluster_Settings($index->getClient());
$settings->setTransient('discovery.zen.minimum_master_nodes', 2);
@@ -20,6 +25,11 @@ public function testSetTransient()
public function testSetPersistent()
{
$index = $this->_createIndex();
+
+ if (count($index->getClient()->getCluster()->getNodes()) < 2) {
+ $this->markTestSkipped('At least two master nodes have to be running for this test');
+ }
+
$settings = new Elastica_Cluster_Settings($index->getClient());
$settings->setPersistent('discovery.zen.minimum_master_nodes', 2);

0 comments on commit 3bcd162

Please sign in to comment.