Skip to content

Commit d978783

Browse files
committed
removed wrong socket usage in recovery test
1 parent b19fa4c commit d978783

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/connection/AConnectionTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,8 @@ public function testSecondsTimeout(string $alias): void
7373
public function testTimeoutRecoverAndReset(string $alias): void
7474
{
7575
$socket = $this->getConnection($alias);
76-
$streamSocket = new StreamSocket($GLOBALS['NEO_HOST'] ?? '127.0.0.1', (int) ($GLOBALS['NEO_PORT'] ?? 7687), 1);
7776
/** @var V4 $protocol */
78-
$protocol = (new Bolt($streamSocket))->build();
77+
$protocol = (new Bolt($socket))->build();
7978
$protocol->hello(Auth::basic($GLOBALS['NEO_USER'], $GLOBALS['NEO_PASS']));
8079

8180
$time = microtime(true);
@@ -90,16 +89,16 @@ public function testTimeoutRecoverAndReset(string $alias): void
9089
$this->assertEqualsWithDelta(1.0, $newTime - $time, 0.2);
9190
}
9291

93-
$streamSocket->setTimeout(100.0);
92+
$socket->setTimeout(100.0);
9493
try {
9594
$protocol->reset();
9695
} catch (MessageException $e) {
9796
echo $e->getMessage();
98-
$protocol = (new Bolt($streamSocket))->build();
97+
$protocol = (new Bolt($socket))->build();
9998
$protocol->hello(Auth::basic($GLOBALS['NEO_USER'], $GLOBALS['NEO_PASS']));
10099
}
101100

102-
$streamSocket->setTimeout(1.0);
101+
$socket->setTimeout(1.0);
103102

104103
$time = microtime(true);
105104
try {

0 commit comments

Comments
 (0)