From 27c19c9e4b0528712e52769e60d1571c85a7aa69 Mon Sep 17 00:00:00 2001 From: Evan Darwin Date: Sat, 20 Jun 2015 13:07:40 -0700 Subject: [PATCH] Fix issue #27 test Conflicts: tests/ClientTest.php --- tests/ClientTest.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/ClientTest.php b/tests/ClientTest.php index cad9201bf7..f44a2b1a04 100644 --- a/tests/ClientTest.php +++ b/tests/ClientTest.php @@ -378,6 +378,29 @@ class ClientTest extends \PHPUnit_Framework_TestCase $this->assertEquals(712423, $body["results"][0]["series"][0]["values"][0][2]); } + /** + * Test that we handle socket problems correctly in the UDP + * adapter, and that they don't inturrupt the user's application. + * + * @group udp + */ + public function testReplicateIssue27() + { + $options = new \InfluxDB\Options(); + + // Configure options + $options->setHost('172.16.1.182'); + $options->setPort(4444); + $options->setDatabase('...'); + $options->setUsername('root'); + $options->setPassword('root'); + + $httpAdapter = new \InfluxDB\Adapter\UdpAdapter($options); + + $client = new \InfluxDB\Client($httpAdapter); + $client->mark("udp.test", ["mark" => "element"]); + } + public function testListActiveDatabses() { $databases = $this->object->getDatabases();