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

Test won't complete, Work will never finish. #50

Open
kristopherchun opened this issue Nov 3, 2017 · 2 comments
Open

Test won't complete, Work will never finish. #50

kristopherchun opened this issue Nov 3, 2017 · 2 comments

Comments

@kristopherchun
Copy link

WATCHING CONFIG: /srv/www/production/reporting-admin/config/ci.php RUNNING: /usr/bin/script -q /tmp/tw-7Ksd5Q vendor/bin/phpunit /srv/www/production/reporting-admin/tests/Unit/ExampleTest.php

The ExampleTest is just a basic test:

public function testBasicTest() { $this->assertTrue(true); }

I've stepped through the code and it appears to be hanging inside of the Symphony Process.php wait function.

vendor/symfony/process/Process.php

` public function wait(callable $callback = null){
$this->requireProcessIsStarted(FUNCTION);

    $this->updateStatus(false);

    if (null !== $callback) {
        if (!$this->processPipes->haveReadSupport()) {
            $this->stop(0);
            throw new \LogicException('Pass the callback to the Process::start method or enableOutput to use a callback with Process::wait');
        }
        $this->callback = $this->buildCallback($callback);
    }

    do {
        $this->checkTimeout();
        $running = '\\' === DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen();
        $this->readPipes($running, '\\' !== DIRECTORY_SEPARATOR || !$running);
    } while ($running);

    while ($this->isRunning()) {
        usleep(1000);
    }

    if ($this->processInformation['signaled'] && $this->processInformation['termsig'] !== $this->latestSignal) {
        throw new RuntimeException(sprintf('The process has been signaled with signal "%s".', $this->processInformation['termsig']));
    }

    return $this->exitcode;
}`

When running ci:work $running never sets itself to false, so it gets stuck inside of the while loop. For somereason "$this->processPipes->areOpen()" never returns as false. I've tried running this basic phpunit test script using ci:work and even after 20+ minutes it never finishes.

The unit tests work fine when running phpunit from command line, "vendor/bin/phpunit /srv/www/production/reporting-admin/tests/Unit/ExampleTest.php"

@wojlive
Copy link

wojlive commented Nov 14, 2017

I have similar issue but my tests are as simple as get to a page see if it's 200 and still it never finishes. Did you find solution?

@fhferreira
Copy link

+1 I am using vagrant, homestead

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

No branches or pull requests

3 participants