Skip to content

Commit 66128bf

Browse files
committed
Rollback bad commit for setConnectTimeOut
1 parent a629f30 commit 66128bf

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ public function setHost($host): void
183183
/**
184184
* max_execution_time , in int value (seconds)
185185
*/
186-
public function setTimeout(int $timeout): Settings
186+
public function setTimeout($timeout): Settings
187187
{
188-
return $this->settings()->max_execution_time($timeout);
188+
return $this->settings()->max_execution_time(intval($timeout));
189189
}
190190

191191
/**

tests/FormatQueryTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function testClientTimeoutSettings()
6161
// max_execution_time - is integer in clickhouse source - Seconds
6262
$this->client->database('default');
6363

64-
$timeout = 0.55; // un support, "clickhouse source - Seconds"
64+
$timeout = 1.515; // un support, "clickhouse source - Seconds"
6565
$this->client->setTimeout($timeout); // 550 ms
6666
$this->client->select('SELECT 123,123 as ping ')->rows();
6767
$this->assertSame(intval($timeout), intval($this->client->getTimeout()));
@@ -76,7 +76,6 @@ public function testClientTimeoutSettings()
7676
$this->client->select('SELECT 123,123 as ping ')->rows();
7777
$this->assertSame(intval($timeout), $this->client->getTimeout());
7878

79-
8079
// getConnectTimeOut is curl, can be float
8180
$timeout = 5.14;
8281
$this->client->setConnectTimeOut($timeout); // 5 seconds

0 commit comments

Comments
 (0)