Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature test of http server #920

Merged
merged 2 commits into from Jun 25, 2023

Conversation

Chance-fyi
Copy link
Contributor

No description provided.

Comment on lines +8 to +18
$process = null;
beforeAll(function () use (&$process) {
$code = file_get_contents(__DIR__ . '/Stub/HttpServer.php');
$process = new PhpProcess($code);
$process->start();
sleep(1);
});

afterAll(function () use (&$process) {
$process->stop();
});
Copy link
Contributor

@joanhey joanhey Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we don't need to start the HttpServer with processes.
In reality is only used to start and stop the server. But it's OK.
This will be more useful to run more future tests concurrently to the server.

Good work.

@joanhey
Copy link
Contributor

joanhey commented Jun 21, 2023

This test can be used with any version of Workerman, and variants.
We only need to adapt the HttpServer.

I'll try to add in Adapterman.

@walkor walkor merged commit 2a224cf into walkor:master Jun 25, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants