Lines Matching full:this
7 * you may not use this file except in compliance with the License.
28 if (!empty($this->channel)) {
29 $this->channel->close();
35 $this->channel = new Grpc\Channel('localhost:50000',
37 $this->assertSame('Grpc\Channel', get_class($this->channel));
42 $this->channel = new Grpc\Channel('localhost:50001',
44 $state = $this->channel->getConnectivityState();
45 $this->assertEquals(0, $state);
50 $this->channel = new Grpc\Channel('localhost:50002',
52 $state = $this->channel->getConnectivityState(123);
53 $this->assertEquals(0, $state);
58 $this->channel = new Grpc\Channel('localhost:50003',
60 $state = $this->channel->getConnectivityState('hello');
61 $this->assertEquals(0, $state);
66 $this->channel = new Grpc\Channel('localhost:50004',
68 $state = $this->channel->getConnectivityState(true);
69 $this->assertEquals(0, $state);
74 $this->channel = new Grpc\Channel('localhost:50005',
76 $target = $this->channel->getTarget();
77 $this->assertTrue(is_string($target));
82 $this->channel = new Grpc\Channel('localhost:50006',
88 $state = $this->channel->watchConnectivityState(1, $deadline);
89 $this->assertTrue($state);
96 $this->channel = new Grpc\Channel('localhost:50007',
98 $this->assertNotNull($this->channel);
99 $this->channel->close();
107 $this->channel = new Grpc\Channel();
108 $this->assertNull($this->channel);
116 $this->channel = new Grpc\Channel('localhost:50008', 'invalid');
117 $this->assertNull($this->channel);
125 $this->channel = new Grpc\Channel('localhost:50009',
134 $this->channel = new Grpc\Channel('localhost:50010',
143 $this->channel = new Grpc\Channel('localhost:50011',
145 $this->channel->getConnectivityState([]);
153 $this->channel = new Grpc\Channel('localhost:50012',
155 $this->channel->watchConnectivityState([]);
163 $this->channel = new Grpc\Channel('localhost:50013',
165 $this->channel->watchConnectivityState(1, 'hi');
170 $this->assertTrue($state == GRPC\CHANNEL_CONNECTING ||
183 $this->assertTrue(false);
188 $this->channel1 = new Grpc\Channel('localhost:50014', [
193 $this->channel2 = new Grpc\Channel('localhost:50014', []);
196 $state = $this->channel1->getConnectivityState();
197 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
198 $state = $this->channel2->getConnectivityState();
199 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
202 $state = $this->channel1->getConnectivityState(true);
203 $this->waitUntilNotIdle($this->channel1);
206 $state = $this->channel1->getConnectivityState();
207 $this->assertConnecting($state);
208 $state = $this->channel2->getConnectivityState();
209 $this->assertConnecting($state);
211 $this->channel1->close();
212 $this->channel2->close();
218 $this->channel1 = new Grpc\Channel('localhost:50015', [
221 $this->channel2 = new Grpc\Channel('localhost:50016', []);
224 $state = $this->channel1->getConnectivityState();
225 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
226 $state = $this->channel2->getConnectivityState();
227 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
230 $state = $this->channel1->getConnectivityState(true);
231 $this->waitUntilNotIdle($this->channel1);
234 $state = $this->channel1->getConnectivityState();
235 $this->assertConnecting($state);
237 $state = $this->channel2->getConnectivityState();
238 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
240 $this->channel1->close();
241 $this->channel2->close();
246 $this->channel1 = new Grpc\Channel('localhost:50017', [
250 $this->channel2 = new Grpc\Channel('localhost:50017', ["abc" => "def"]);
253 $state = $this->channel1->getConnectivityState(true);
254 $this->waitUntilNotIdle($this->channel1);
256 $state = $this->channel1->getConnectivityState();
257 $this->assertConnecting($state);
258 $state = $this->channel2->getConnectivityState();
259 $this->assertConnecting($state);
261 $this->channel1->close();
262 $this->channel2->close();
267 $this->channel1 = new Grpc\Channel('localhost:50018', [
270 $this->channel2 = new Grpc\Channel('localhost:50018', ["abc" => "def"]);
273 $state = $this->channel1->getConnectivityState(true);
274 $this->waitUntilNotIdle($this->channel1);
276 $state = $this->channel1->getConnectivityState();
277 $this->assertConnecting($state);
278 $state = $this->channel2->getConnectivityState();
279 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
281 $this->channel1->close();
282 $this->channel2->close();
290 $this->channel1 = new Grpc\Channel('localhost:50019',
294 $this->channel2 = new Grpc\Channel('localhost:50019',
298 $state = $this->channel1->getConnectivityState(true);
299 $this->waitUntilNotIdle($this->channel1);
301 $state = $this->channel1->getConnectivityState();
302 $this->assertConnecting($state);
303 $state = $this->channel2->getConnectivityState();
304 $this->assertConnecting($state);
306 $this->channel1->close();
307 $this->channel2->close();
316 $this->channel1 = new Grpc\Channel('localhost:50020',
320 $this->channel2 = new Grpc\Channel('localhost:50020',
324 $state = $this->channel1->getConnectivityState(true);
325 $this->waitUntilNotIdle($this->channel1);
327 $state = $this->channel1->getConnectivityState();
328 $this->assertConnecting($state);
329 $state = $this->channel2->getConnectivityState();
330 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
332 $this->channel1->close();
333 $this->channel2->close();
343 $this->channel1 = new Grpc\Channel('localhost:50021',
347 $this->channel2 = new Grpc\Channel('localhost:50021',
351 $state = $this->channel1->getConnectivityState(true);
352 $this->waitUntilNotIdle($this->channel1);
354 $state = $this->channel1->getConnectivityState();
355 $this->assertConnecting($state);
356 $state = $this->channel2->getConnectivityState();
357 $this->assertConnecting($state);
359 $this->channel1->close();
360 $this->channel2->close();
368 $this->channel1 = new Grpc\Channel('localhost:50022',
372 $this->channel2 = new Grpc\Channel('localhost:50022',
376 $state = $this->channel1->getConnectivityState(true);
377 $this->waitUntilNotIdle($this->channel1);
379 $state = $this->channel1->getConnectivityState();
380 $this->assertConnecting($state);
381 $state = $this->channel2->getConnectivityState();
382 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
384 $this->channel1->close();
385 $this->channel2->close();
391 $this->channel1 = new Grpc\Channel('localhost:50123', [
394 $this->channel2 = new Grpc\Channel('localhost:50123', []);
397 $this->channel1->close();
402 $state = $this->channel2->getConnectivityState();
403 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
412 $this->channel1 = new Grpc\Channel('localhost:50223', [
415 $this->channel2 = new Grpc\Channel('localhost:50223', []);
418 $this->channel1->close();
421 $state = $this->channel2->getConnectivityState();
422 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
425 $state = $this->channel1->getConnectivityState();
430 $this->channel1 = new Grpc\Channel('localhost:50024', [
434 $this->channel1->close();
436 $this->channel2 = new Grpc\Channel('localhost:50024', []);
437 $state = $this->channel2->getConnectivityState();
438 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
440 $this->channel2->close();
445 $this->channel1 = new Grpc\Channel('localhost:50025', [
448 $this->channel2 = new Grpc\Channel('localhost:50025', []);
449 $this->channel3 = new Grpc\Channel('localhost:50025', []);
452 $state = $this->channel1->getConnectivityState(true);
453 $this->waitUntilNotIdle($this->channel1);
456 $state = $this->channel1->getConnectivityState();
457 $this->assertConnecting($state);
458 $state = $this->channel2->getConnectivityState();
459 $this->assertConnecting($state);
460 $state = $this->channel3->getConnectivityState();
461 $this->assertConnecting($state);
463 $this->channel1->close();
480 [$this, 'callbackFunc']);
487 $this->channel1 = new Grpc\Channel('localhost:50026',
492 $this->channel2 = new Grpc\Channel('localhost:50026',
497 $state = $this->channel1->getConnectivityState(true);
498 $this->waitUntilNotIdle($this->channel1);
500 $state = $this->channel1->getConnectivityState();
501 $this->assertConnecting($state);
502 $state = $this->channel2->getConnectivityState();
503 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
505 $this->channel1->close();
506 $this->channel2->close();
512 [$this, 'callbackFunc']);
514 [$this, 'callbackFunc2']);
526 $this->channel1 = new Grpc\Channel('localhost:50027',
530 $this->channel2 = new Grpc\Channel('localhost:50027',
532 $this->channel3 = new Grpc\Channel('localhost:50027',
536 $state = $this->channel1->getConnectivityState(true);
537 $this->waitUntilNotIdle($this->channel1);
539 $state = $this->channel1->getConnectivityState();
540 $this->assertConnecting($state);
541 $state = $this->channel2->getConnectivityState();
542 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
543 $state = $this->channel3->getConnectivityState();
544 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
546 $this->channel1->close();
547 $this->channel2->close();
548 $this->channel3->close();
553 $this->channel1 = new Grpc\Channel('localhost:50028', [
558 $this->channel2 = new Grpc\Channel('localhost:50028',
562 $state = $this->channel1->getConnectivityState(true);
563 $this->waitUntilNotIdle($this->channel1);
565 $state = $this->channel1->getConnectivityState();
566 $this->assertConnecting($state);
567 $state = $this->channel2->getConnectivityState();
568 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
570 $this->channel1->close();
571 $this->channel2->close();
577 $this->channel1 = new Grpc\Channel('localhost:50029', [
580 $this->channel2 = new Grpc\Channel('localhost:50029',
583 $this->channel3 = new Grpc\Channel('localhost:50029', []);
586 $state = $this->channel2->getConnectivityState(true);
587 $this->waitUntilNotIdle($this->channel2);
588 $state = $this->channel1->getConnectivityState();
589 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
590 $state = $this->channel2->getConnectivityState();
591 $this->assertConnecting($state);
592 $state = $this->channel3->getConnectivityState();
593 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
595 $this->channel1->close();
596 $this->channel2->close();
602 $this->channel1 = new Grpc\Channel('localhost:50029', [
605 $this->channel2 = new Grpc\Channel('localhost:50029', []);
608 $state = $this->channel1->getConnectivityState(true);
609 $this->waitUntilNotIdle($this->channel2);
610 $state = $this->channel1->getConnectivityState();
611 $this->assertConnecting($state);
612 $state = $this->channel2->getConnectivityState();
613 $this->assertConnecting($state);
615 $this->channel1->close();
616 $this->channel2->close();
622 $this->channel1 = new Grpc\Channel('localhost:50130', [
625 $this->channel2 = new Grpc\Channel('localhost:50130',
628 $this->channel3 = new Grpc\Channel('localhost:50130', []);
630 $this->channel1->close();
632 $state = $this->channel2->getConnectivityState();
633 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
638 $state = $this->channel3->getConnectivityState();
639 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
648 $this->channel1 = new Grpc\Channel('localhost:50230', [
651 $this->channel2 = new Grpc\Channel('localhost:50230',
654 $this->channel3 = new Grpc\Channel('localhost:50230', []);
656 $this->channel1->close();
658 $state = $this->channel2->getConnectivityState();
659 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
662 $state = $this->channel3->getConnectivityState();
663 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
666 $this->channel1->getConnectivityState();
672 $this->channel1 = new Grpc\Channel('localhost:50031', [
675 $this->channel2 = new Grpc\Channel('localhost:50031',
677 $this->channel3 = new Grpc\Channel('localhost:50031', []);
679 $this->channel2->close();
681 $state = $this->channel1->getConnectivityState();
682 $this->assertEquals(GRPC\CHANNEL_IDLE, $state);
685 $state = $this->channel1->getConnectivityState(true);
686 $this->waitUntilNotIdle($this->channel1);
688 $state = $this->channel1->getConnectivityState();
689 $this->assertConnecting($state);
691 $this->channel1->close();