Skip to content

Commit

Permalink
Set pidFile and logFile for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor committed Dec 11, 2024
1 parent a33fb4d commit 9226e64
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/Feature/Stub/HttpServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,7 @@
};

Worker::$command = 'start';

Worker::$pidFile = sprintf('%s/test-http-server.pid', sys_get_temp_dir());
Worker::$logFile = sprintf('%s/test-http-server.log', sys_get_temp_dir());
Worker::runAll();
2 changes: 2 additions & 0 deletions tests/Feature/Stub/UdpServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
$connection->send('received: ' . $data);
};

Worker::$pidFile = sprintf('%s/test-udp-server.pid', sys_get_temp_dir());
Worker::$logFile = sprintf('%s/test-udp-server.log', sys_get_temp_dir());
Worker::$command = 'start';
Worker::runAll();
1 change: 1 addition & 0 deletions tests/Feature/Stub/WebsocketClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
};

Worker::$pidFile = sprintf('%s/test-websocket-client.pid', sys_get_temp_dir());
Worker::$logFile = sprintf('%s/test-websocket-client.log', sys_get_temp_dir());
Worker::$command = 'start';
Worker::runAll();
1 change: 1 addition & 0 deletions tests/Feature/Stub/WebsocketServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
//%action%

Worker::$pidFile = sprintf('%s/test-websocket-server.pid', sys_get_temp_dir());
Worker::$logFile = sprintf('%s/test-websocket-server.log', sys_get_temp_dir());
Worker::$command = 'start';
Worker::runAll();

0 comments on commit 9226e64

Please sign in to comment.