Skip to content

Commit

Permalink
Ensure app is available when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed Jun 19, 2024
1 parent 326bdc6 commit 25d4dc4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/RoadRunnerServerProcessInspectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function test_can_determine_if_roadrunner_server_process_is_running_when_
/** @doesNotPerformAssertions @test */
public function test_roadrunner_server_process_can_be_reloaded()
{
$this->createApplication();
$inspector = new ServerProcessInspector(
$processIdFile = new ServerStateFile(sys_get_temp_dir().'/swoole.pid'),
$processFactory = Mockery::mock(SymfonyProcessFactory::class),
Expand Down
3 changes: 3 additions & 0 deletions tests/SequentialTaskDispatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function test_tasks_can_be_resolved()

public function test_resolving_tasks_with_exceptions_do_not_effect_other_tasks()
{
$this->createApplication();
$dispatcher = new SequentialTaskDispatcher;

$a = false;
Expand Down Expand Up @@ -77,6 +78,7 @@ public function test_tasks_can_be_dispatched()

public function test_resolving_tasks_propagate_exceptions()
{
$this->createApplication();
$dispatcher = new SequentialTaskDispatcher();

$this->expectException(TaskException::class);
Expand All @@ -89,6 +91,7 @@ public function test_resolving_tasks_propagate_exceptions()

public function test_resolving_tasks_propagate_dd_calls()
{
$this->createApplication();
$dispatcher = new SequentialTaskDispatcher();

$this->expectException(DdException::class);
Expand Down
5 changes: 5 additions & 0 deletions tests/SwooleClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public function test_static_file_can_be_served(): void
/** @doesNotPerformAssertions @test */
public function test_static_file_headers_can_be_sent(): void
{
$this->createApplication();
$client = new SwooleClient;

$request = Request::create('/foo.txt', 'GET');
Expand Down Expand Up @@ -206,6 +207,7 @@ public function test_respond_method_sends_response_to_swoole(): void
/** @doesNotPerformAssertions @test */
public function test_respond_method_send_streamed_response_to_swoole(): void
{
$this->createApplication();
$client = new SwooleClient;

$swooleResponse = Mockery::mock('Swoole\Http\Response');
Expand All @@ -227,6 +229,7 @@ public function test_respond_method_send_streamed_response_to_swoole(): void
/** @doesNotPerformAssertions @test */
public function test_respond_method_with_laravel_specific_status_code_sends_response_to_swoole(): void
{
$this->createApplication();
$client = new SwooleClient;

$swooleResponse = Mockery::mock('Swoole\Http\Response');
Expand Down Expand Up @@ -286,6 +289,7 @@ public function test_error_method_sends_detailed_error_response_to_swoole_in_deb
/** @doesNotPerformAssertions @test */
public function test_respond_method_send_not_chunked_response_to_swoole(): void
{
$this->createApplication();
$client = new SwooleClient;

$swooleResponse = Mockery::mock(SwooleResponse::class);
Expand All @@ -307,6 +311,7 @@ public function test_respond_method_send_not_chunked_response_to_swoole(): void
/** @doesNotPerformAssertions @test */
public function test_respond_method_send_chunked_response_to_swoole(): void
{
$this->createApplication();
$client = new SwooleClient(6);

$swooleResponse = Mockery::mock('Swoole\Http\Response');
Expand Down

0 comments on commit 25d4dc4

Please sign in to comment.