33
44use DateTime ;
55use DateTimeZone ;
6- use InfluxDB \Options ;
6+ use InfluxDB \Adapter \ Http \ Options ;
77use InfluxDB \Adapter \UdpAdapter ;
88use InfluxDB \Adapter \GuzzleAdapter as InfluxHttpAdapter ;
99use GuzzleHttp \Client as GuzzleHttpClient ;
@@ -121,18 +121,15 @@ public function testDropExistingDatabase()
121121 */
122122 public function testReplicateIssue27 ()
123123 {
124- $ options = new \InfluxDB \Options ();
124+ $ options = new \InfluxDB \Adapter \ Udp \ Options ();
125125
126126 // Configure options
127127 $ options ->setHost ('172.16.1.182 ' );
128128 $ options ->setPort (4444 );
129- $ options ->setDatabase ('... ' );
130- $ options ->setUsername ('root ' );
131- $ options ->setPassword ('root ' );
132129
133130 $ guzzleHttp = new GuzzleHttpClient ();
134131 $ writer = new UdpWriter ($ options );
135- $ reader = new Reader ($ guzzleHttp , $ options );
132+ $ reader = new Reader ($ guzzleHttp , new Options () );
136133 $ client = new Client ($ reader , $ writer );
137134 $ client ->mark ("udp.test " , ["mark " => "element " ]);
138135 }
@@ -142,15 +139,13 @@ public function testReplicateIssue27()
142139 */
143140 public function testWriteUDPPackagesToNoOne ()
144141 {
145- $ options = new Options ();
142+ $ options = new \ InfluxDB \ Adapter \ Udp \ Options ();
146143 $ options ->setHost ("127.0.0.1 " );
147- $ options ->setUsername ("nothing " );
148- $ options ->setPassword ("nothing " );
149144 $ options ->setPort (64071 ); //This is a wrong port
150145
151146 $ guzzleHttp = new GuzzleHttpClient ();
152147 $ writer = new UdpWriter ($ options );
153- $ reader = new Reader ($ guzzleHttp , $ options );
148+ $ reader = new Reader ($ guzzleHttp , new Options () );
154149 $ client = new Client ($ reader , $ writer );
155150
156151 $ client ->mark ("udp.test " , ["mark " => "element " ]);
@@ -161,15 +156,13 @@ public function testWriteUDPPackagesToNoOne()
161156 */
162157 public function testWriteUDPPackagesToInvalidHostname ()
163158 {
164- $ options = new Options ();
159+ $ options = new \ InfluxDB \ Adapter \ Udp \ Options ();
165160 $ options ->setHost ("www.test-invalid.this-is-not-a-tld " );
166- $ options ->setUsername ("nothing " );
167- $ options ->setPassword ("nothing " );
168161 $ options ->setPort (15984 );
169162
170163 $ guzzleHttp = new GuzzleHttpClient ();
171164 $ writer = new UdpWriter ($ options );
172- $ reader = new Reader ($ guzzleHttp , $ options );
165+ $ reader = new Reader ($ guzzleHttp , new Options () );
173166 $ client = new Client ($ reader , $ writer );
174167
175168 $ client ->mark ("udp.test " , ["mark " => "element " ]);
0 commit comments