Skip to content

Commit 010d0ca

Browse files
PHP: update memory leak tests
1 parent e22ffc6 commit 010d0ca

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

src/php/tests/MemoryLeakTest/MemoryLeakTest.php

+3-15
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function waitUntilNotIdle($channel) {
4747
}
4848

4949
// Set up
50-
$channel = new Grpc\Channel('localhost:0', ['credentials' => Grpc\ChannelCredentials::createInsecure()]);
50+
$channel = new Grpc\Channel('localhost:50101', ['credentials' => Grpc\ChannelCredentials::createInsecure()]);
5151

5252
// Test InsecureCredentials
5353
assert('Grpc\Channel' == get_class($channel));
@@ -56,28 +56,16 @@ function waitUntilNotIdle($channel) {
5656
$state = $channel->getConnectivityState();
5757
assert(0 == $state);
5858

59-
// Test GetConnectivityStateWithInt
60-
$state = $channel->getConnectivityState(123);
61-
assert(0 == $state);
62-
63-
// Test GetConnectivityStateWithString
64-
$state = $channel->getConnectivityState('hello');
65-
assert(0 == $state);
66-
67-
// Test GetConnectivityStateWithBool
68-
$state = $channel->getConnectivityState(true);
69-
assert(0 == $state);
70-
7159
$channel->close();
7260

7361
// Test GetTarget
74-
$channel = new Grpc\Channel('localhost:8888', ['credentials' => Grpc\ChannelCredentials::createInsecure()]);
62+
$channel = new Grpc\Channel('localhost:50102', ['credentials' => Grpc\ChannelCredentials::createInsecure()]);
7563
$target = $channel->getTarget();
7664
assert(is_string($target) == true);
7765
$channel->close();
7866

7967
// Test WatchConnectivityState
80-
$channel = new Grpc\Channel('localhost:0', ['credentials' => Grpc\ChannelCredentials::createInsecure()]);
68+
$channel = new Grpc\Channel('localhost:50103', ['credentials' => Grpc\ChannelCredentials::createInsecure()]);
8169
$now = Grpc\Timeval::now();
8270
$deadline = $now->add(new Grpc\Timeval(100*1000));
8371

0 commit comments

Comments
 (0)