Giter VIP home page Giter VIP logo

Comments (8)

dbaltas avatar dbaltas commented on June 20, 2024

Findings

When count($this->modified) (on WrapperRunner) is bigger than one, then the exception is thrown.
When count($this->modified) == 1 the test suite pass.

To reproduce

check out tripsta/paratest/issues/54-wrapper-runner-exception and run

bin/paratest -p 2 --runner WrapperRunner test/fixtures/tests/EnvironmentTest.php

Example of exception

worker count in startWorkers 2
pending count 1
modifed count 2
worker count in progressedWorkers 2
PHP Catchable fatal error: Argument 1 passed to ParaTest\Runners\PHPUnit\Worker::assign() must be an instance of ParaTest\Runners\PHPUnit\ExecutableTest, null given, called in /home/dbaltas/projects/paratest/src/ParaTest/Runners/PHPUnit/WrapperRunner.php on line 89 and defined in /home/dbaltas/projects/paratest/src/ParaTest/Runners/PHPUnit/Worker.php on line 47

Example of success

worker count in startWorkers 2
pending count 1
modifed count 1
worker count in progressedWorkers 1
modifed count 1
worker count in progressedWorkers 1
modifed count 1
worker count in progressedWorkers 1
modifed count 1
worker count in progressedWorkers 1
modifed count 1
worker count in progressedWorkers 1
modifed count 1
worker count in progressedWorkers 1
modifed count 1
worker count in progressedWorkers 1
modifed count 1
worker count in progressedWorkers 1
..

Time: 0 seconds, Memory: 3.25Mb

OK (2 tests, 6 assertions)

from paratest.

giorgiosironi avatar giorgiosironi commented on June 20, 2024

Thank you for the investigation, since it can be reproduced I'll try to fix
this issue.

from paratest.

dbaltas avatar dbaltas commented on June 20, 2024

@giorgiosironi Is the above fix OK?
Also this issue still persists in last builds of master in travis 118,121, even though it passed on 119 with the same code as 121,

1) PerformanceTest::testRunningSuitesWithLongBootstrapsIsFasterWithTheWrapperRunner
Symfony\Component\Process\Exception\RuntimeException: The process timed-out.

from paratest.

giorgiosironi avatar giorgiosironi commented on June 20, 2024

Yes, the fix is ok as this is a race condition between $this->pending and "more workers than pending tests" being available in a single shot. I'll look at master and see if I can reproduce the issue.

from paratest.

giorgiosironi avatar giorgiosironi commented on June 20, 2024

I'll download a 5.3 VM to get the same problem.

from paratest.

giorgiosironi avatar giorgiosironi commented on June 20, 2024

Reproduced on 5.3.10, with a similar test. Symfony/Process has a default timeout of 60 seconds for a process (don't know between which events it is measured), and that stops the suite.
PHP 5.3 is nototiously slower than 5.4, so that's probably why it is happening only in that environment.

from paratest.

giorgiosironi avatar giorgiosironi commented on June 20, 2024

I got a green build here:
https://travis-ci.org/giorgiosironi/paratest
and the identical commit failing on 5.3 here:
https://travis-ci.org/brianium/paratest

from paratest.

dbaltas avatar dbaltas commented on June 20, 2024

Its OK. Thumbs up!

from paratest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.