Skip to content

Commit

Permalink
Update version for Swoole 4.4.20 (#3614)
Browse files Browse the repository at this point in the history
* Update version for Swoole 4.4.20

* Fix test

* Update package.xml
  • Loading branch information
Yurunsoft authored Sep 1, 2020
1 parent 60d35fa commit 8c2e393
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 33 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PROJECT(libswoole)

ENABLE_LANGUAGE(ASM)
SET(SWOOLE_VERSION 4.4.19)
SET(SWOOLE_VERSION 4.4.20)
SET(SWOOLE_CLFLAGS pthread rt dl ssl crypt crypto)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
Expand Down
6 changes: 3 additions & 3 deletions include/swoole.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ int clock_gettime(clock_id_t which_clock, struct timespec *t);

#define SWOOLE_MAJOR_VERSION 4
#define SWOOLE_MINOR_VERSION 4
#define SWOOLE_RELEASE_VERSION 19
#define SWOOLE_RELEASE_VERSION 20
#define SWOOLE_EXTRA_VERSION ""
#define SWOOLE_VERSION "4.4.19"
#define SWOOLE_VERSION_ID 40419
#define SWOOLE_VERSION "4.4.20"
#define SWOOLE_VERSION_ID 40420
#define SWOOLE_BUG_REPORT \
"A bug occurred in Swoole-v" SWOOLE_VERSION ", please report it.\n"\
"The Swoole developers probably don't know about it,\n"\
Expand Down
29 changes: 21 additions & 8 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
<email>[email protected]</email>
<active>yes</active>
</developer>
<date>2020-05-28</date>
<time>15:00:00</time>
<date>2020-09-01</date>
<time>20:00:00</time>
<version>
<release>4.4.19</release>
<release>4.4.20</release>
<api>4.0</api>
</version>
<stability>
Expand All @@ -54,11 +54,19 @@
</stability>
<license uri="http://www.apache.org/licenses/LICENSE-2.0.html">Apache2.0</license>
<notes>
Notice: v4.4.x is no longer the main maintenance branch, bug fixes only when necessary

Fixed
---
* Merged all the bugfix patches from v4.5.x
* Fixed Swoole\Server::close throw a error when set dispatch_func (#3365) (@twose)
* Fixed format_buffer init problem when use Swoole\Redis\Server::format (#3369) (@matyhtf) (@twose)
* Fixed get mac address in OSX (#3372) (@twose)
* Fixed mysql test case (#3374) (@qiqizjl)
* Fixed the server could not be stopped during the WorkerStart phase (#3382) (@huanghantao)
* Fixed missing MySQL transaction error, update the test (#3429) (@twose)
* Fixed fix HTTP Client download filename bug, double free memory (#3489) (@Yurunsoft)
* Fixed Coroutine\Http\Client->getHeaderOut coredump (#3534) (@matyhtf)
* Fixed fix HTTP header/cookie injection when use CRLF (#3539) (#3541) (#3545) (chromium1337) (@huanghantao)
* Fixed set coroutine websocket server frame->fd (#3549) (@huanghantao)
* Fixed hook phpredis read error on connection (#3579) (@twose)
</notes>
<contents>
<dir name="/">
Expand Down Expand Up @@ -1039,8 +1047,10 @@
<file role="test" name="tests/swoole_http_client_coro/disable_keep_alive.phpt" />
<file role="test" name="tests/swoole_http_client_coro/download.phpt" />
<file role="test" name="tests/swoole_http_client_coro/download_302.phpt" />
<file role="test" name="tests/swoole_http_client_coro/download_filename_bug.phpt" />
<file role="test" name="tests/swoole_http_client_coro/error_handler.phpt" />
<file role="test" name="tests/swoole_http_client_coro/get.phpt" />
<file role="test" name="tests/swoole_http_client_coro/get_header_out_after_close.phpt" />
<file role="test" name="tests/swoole_http_client_coro/get_twice.phpt" />
<file role="test" name="tests/swoole_http_client_coro/get_twice_keepalive.phpt" />
<file role="test" name="tests/swoole_http_client_coro/get_without_content_length.phpt" />
Expand All @@ -1049,7 +1059,9 @@
<file role="test" name="tests/swoole_http_client_coro/host.phpt" />
<file role="test" name="tests/swoole_http_client_coro/http_proxy.phpt" />
<file role="test" name="tests/swoole_http_client_coro/http_proxy_443.phpt" />
<file role="test" name="tests/swoole_http_client_coro/http_upload_big.phpt" />
<file role="test" name="tests/swoole_http_client_coro/https.phpt" />
<file role="test" name="tests/swoole_http_client_coro/https_upload_big.phpt" />
<file role="test" name="tests/swoole_http_client_coro/issue_2664.phpt" />
<file role="test" name="tests/swoole_http_client_coro/keep_alive.phpt" />
<file role="test" name="tests/swoole_http_client_coro/long_domain.phpt" />
Expand All @@ -1068,7 +1080,6 @@
<file role="test" name="tests/swoole_http_client_coro/timeout_when_recv.phpt" />
<file role="test" name="tests/swoole_http_client_coro/unixsocket.phpt" />
<file role="test" name="tests/swoole_http_client_coro/upload.phpt" />
<file role="test" name="tests/swoole_http_client_coro/upload_big.phpt" />
<file role="test" name="tests/swoole_http_client_coro/upload_huge.phpt" />
<file role="test" name="tests/swoole_http_client_coro/upload_with_null_args.phpt" />
<file role="test" name="tests/swoole_http_client_coro/websocket.phpt" />
Expand Down Expand Up @@ -1141,6 +1152,8 @@
<file role="test" name="tests/swoole_http_server_coro/bug_2682.phpt" />
<file role="test" name="tests/swoole_http_server_coro/bug_3025.phpt" />
<file role="test" name="tests/swoole_http_server_coro/bug_no_handle.phpt" />
<file role="test" name="tests/swoole_http_server_coro/check_cookie_crlf.phpt" />
<file role="test" name="tests/swoole_http_server_coro/check_http_header_crlf.phpt" />
<file role="test" name="tests/swoole_http_server_coro/error_404.phpt" />
<file role="test" name="tests/swoole_http_server_coro/handle.phpt" />
<file role="test" name="tests/swoole_http_server_coro/http2.phpt" />
Expand Down Expand Up @@ -1496,12 +1509,12 @@
<file role="test" name="tests/swoole_server/slow_client.phpt" />
<file role="test" name="tests/swoole_server/ssl/00.phpt" />
<file role="test" name="tests/swoole_server/ssl/bad_client.phpt" />
<file role="test" name="tests/swoole_server/ssl/golang.phpt" />
<file role="test" name="tests/swoole_server/ssl/verify_01.phpt" />
<file role="test" name="tests/swoole_server/ssl/verify_02.phpt" />
<file role="test" name="tests/swoole_server/ssl/verify_03.phpt" />
<file role="test" name="tests/swoole_server/stats.phpt" />
<file role="test" name="tests/swoole_server/stop.phpt" />
<file role="test" name="tests/swoole_server/stop_in_workerStart.phpt" />
<file role="test" name="tests/swoole_server/task/base.phpt" />
<file role="test" name="tests/swoole_server/task/bug_2585.phpt" />
<file role="test" name="tests/swoole_server/task/callback_is_null.phpt" />
Expand Down
1 change: 0 additions & 1 deletion tests/swoole_http2_client_coro/post.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ go(function () {
});
?>
--EXPECT--

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ swoole_event::wait();

?>
--EXPECT--

23 changes: 10 additions & 13 deletions tests/swoole_process/daemon.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ require __DIR__ . '/../include/skipif.inc';
<?php
require __DIR__ . '/../include/bootstrap.php';

const FILE = __DIR__ . '/output.txt';
use Swoole\Process;

$process = new Process('python_process', true);
$pid = $process->start();
$sockets = stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, STREAM_IPPROTO_IP);

function python_process(swoole_process $worker)
{
$fp = fopen(FILE, 'a');
Process::daemon(1, 1, [null, $fp, $fp]);
$process = new Process(function (swoole_process $worker) use ($sockets) {
fclose($sockets[1]);
Process::daemon(1, 1, [null, $sockets[0], $sockets[0]]);

fwrite(STDOUT, "ERROR 1\n");
fwrite(STDOUT, "ERROR 2\n");
Expand All @@ -26,24 +23,24 @@ function python_process(swoole_process $worker)
fwrite(STDERR, "ERROR 4\n");
fwrite(STDERR, "ERROR 5\n");
fwrite(STDERR, "END\n");

}
}, true);
$pid = $process->start();

Process::wait();
fclose($sockets[0]);

$fp = fopen(FILE, 'r');
for ($i = 0; $i < 100; $i++) {
while (true) {
$fp = $sockets[1];
$line = fgets($fp);
if (empty($line)) {
usleep(100000);
break;
} else {
echo $line;
if ($line == "END\n") {
break;
}
}
}
unlink(FILE);

?>
--EXPECT--
Expand Down
14 changes: 8 additions & 6 deletions tests/swoole_redis_coro/auto_reconnect_ex.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,30 @@ require __DIR__ . '/../include/bootstrap.php';

use Swoole\Redis\Server;

$pm = new ProcessManager;
$pm = new SwooleTest\ProcessManager;
$pm->parentFunc = function () use ($pm) {
go(function () use ($pm) {
Co\run(function () use ($pm) {
$redis = new Swoole\Coroutine\Redis;
$ret = $redis->connect('127.0.0.1', $pm->getFreePort());
Assert::true($ret);
for ($n = MAX_REQUESTS; $n--;) {
$ret = $redis->set('random_val', $random = get_safe_random(128));
Assert::true($ret);
Assert::true($ret, "code: {$redis->errCode}, msg={$redis->errMsg}");
$ret = $redis->get('random_val');
Assert::true($ret && $ret === $random);
Assert::true($ret && $ret === $random, "code: {$redis->errCode}, msg={$redis->errMsg}");
Co::sleep(0.001);
}
$redis->setOptions(['reconnect' => false]);
for ($n = MAX_REQUESTS; $n--;) {
$ret = $redis->set('random_val', $random = get_safe_random(128));
Assert::true($n === MAX_REQUESTS ? $ret : !$ret);
$ret = $redis->get('random_val');
Assert::true($n === MAX_REQUESTS ? ($ret && $ret === $random) : !$ret);
Co::sleep(0.001);
}
$pm->kill();
echo "DONE\n";
});
$pm->kill();
echo "DONE\n";
};
$pm->childFunc = function () use ($pm) {
$server = new Server('127.0.0.1', $pm->getFreePort(), SWOOLE_BASE);
Expand Down

0 comments on commit 8c2e393

Please sign in to comment.