Aaron Piotrowski
dfb7b0149b
Add test delay to allow process to crash
...
Sending to fast can succeed before process crashes.
2020-02-10 17:40:34 -06:00
Aaron Piotrowski
4ed05f6aac
Improve error handling when sending and receiving
2020-02-10 12:29:27 -06:00
Aaron Piotrowski
2b418eb71d
Improve error message for non-autoloadable callables
...
Fixes #83 .
2019-08-27 18:28:31 -05:00
Aaron Piotrowski
24213ee911
Upgrade to PHPUnit 7 or 8
2019-08-27 12:17:41 -05:00
Aaron Piotrowski
7303b8dcf3
Fix exiting parallel context
2019-04-30 14:47:37 -05:00
Aaron Piotrowski
740696275c
Add a couple tests and ignore some blocks only executed in threads
2019-03-08 13:37:52 -06:00
Aaron Piotrowski
7c8f936618
Autoloading → Bootstrap
...
Calling the file a boostrap makes more sense as more than defining an autoloader can be done in the file.
2019-02-22 16:10:30 -06:00
Aaron Piotrowski
7c8756c3a5
Add custom autoloader option for workers
...
Fixes #55 and #71 .
2019-02-20 17:39:39 -06:00
Aaron Piotrowski
5deeb81501
Skip parallel worker tests if extension is not installed
2019-02-18 10:27:07 -06:00
Aaron Piotrowski
f919371aee
Don't swallow SynchronizationError in ContextException
2019-02-18 09:38:42 -06:00
Aaron Piotrowski
f2e5224856
Unite Process and Parallel context interfaces
...
Allows scripts to be written for either context.
2019-02-17 23:50:41 -06:00
Aaron Piotrowski
c60fc63cb6
Add timer in parallel context for kill breakpoint
2019-02-14 01:10:40 -06:00
Aaron Piotrowski
2d35051391
Update for krakjoe/parallel changes
2019-02-14 00:56:27 -06:00
Aaron Piotrowski
410c88e859
Serialize function arguments
...
Maybe this is a horrible idea, but we serialize everything else, so why not?
2019-02-14 00:34:45 -06:00
Aaron Piotrowski
ecaf0a854b
Add support for krakjoe/parallel
2019-02-14 00:34:45 -06:00
Aaron Piotrowski
398989d41d
Move test scripts to Fixtures directory
2019-02-13 18:19:46 -06:00
Aaron Piotrowski
c77843fa77
Catch parse error and provide better error message
2019-02-13 16:36:45 -06:00
Aaron Piotrowski
9b17d540a9
Move ConstantTask to Fixtures directory
2019-02-13 14:17:52 -06:00
Aaron Piotrowski
1ee8e202ed
Apply the same treatment to context exceptions
...
Sends info about previous exceptions thrown in the context to the parent.
2019-01-25 17:53:19 -06:00
Aaron Piotrowski
9236ade19f
Capture previous exceptions of exceptions thrown from Task::run()
2019-01-25 14:29:32 -06:00
Aaron Piotrowski
80c07011d6
Fix failing Process::join()
...
If the process is killed while joining, an exception was thrown from Process::kill().
2019-01-09 10:25:30 -06:00
Aaron Piotrowski
ccf285bdcc
Cleanup test
2018-12-30 13:32:25 -06:00
Max Furtuna
c4eed9535b
Test for #66
2018-12-19 18:34:06 -06:00
Niklas Keller
912047f2ec
Add CallableTask and enqueueCallable
2018-11-04 10:17:19 -06:00
Aaron Piotrowski
4c3c93e46a
Fix DefaultPool::shutdown()
...
Forgot to update this to match Worker::shutdown() behavior.
2018-10-27 11:19:01 -05:00
Aaron Piotrowski
60e0213904
Update functions test for rename
2018-10-27 09:56:09 -05:00
Aaron Piotrowski
1c1d22b7f6
Pool::get() → Pool::getWorker()
...
Also renamed Worker\get() to Worker\pool()->getWorker().
2018-10-25 09:54:40 -05:00
Aaron Piotrowski
a5c08a2041
Pause before exiting thread in test
...
Not sure why exiting immediately allows the write to succeed.
2018-10-24 11:13:42 -05:00
Aaron Piotrowski
9197b9f0eb
Update channel tests
2018-10-23 22:44:02 -05:00
Aaron Piotrowski
14def89bff
Improve error messages when unserializable data is used
2018-10-23 22:10:12 -05:00
Aaron Piotrowski
b562925e6d
Do not yield context start
2018-10-22 14:46:47 -05:00
Aaron Piotrowski
69d4cde4a6
Remove unnecessary pool error test classes
...
The single test method should have been part of the existing abstract pool test.
2018-10-21 10:41:30 -05:00
Aaron Piotrowski
562ae6f68d
Remove AbstractWorker::cancel() and report worker as running on start
2018-10-08 12:27:18 -05:00
peter279k
4b438814f3
Enhance worker tests ( #43 )
2018-10-07 10:15:50 -05:00
Aaron Piotrowski
b654463339
Fix code style
2018-10-07 09:50:45 -05:00
Aaron Piotrowski
394eeb6ac0
Update thread test
2018-10-07 09:32:04 -05:00
Aaron Piotrowski
cb5ea736d4
Improve process IPC
...
Processes now use a shared server socket instead of stdin and stdout for IPC.
2018-10-07 09:31:35 -05:00
Aaron Piotrowski
ca051a0aa6
Fail queued tasks after shutdown is invoked
2018-10-07 09:23:42 -05:00
Gabriel Caruso
02a3b84f8f
Use dedicated PHPUnit assertions
2018-03-21 21:54:05 +01:00
Niklas Keller
b4cdb95f58
Fix test after error message change
2018-03-21 13:56:19 +01:00
Aaron Piotrowski
7ef75bd5db
Reduce test iterations
...
pthreads seems to be having trouble with such quick generation of threads. Will look into what may be happening here… but the number of iterations isn't terribly important for the modified test.
2018-01-22 17:59:13 -06:00
Aaron Piotrowski
4cbdddd052
Fix code style
2018-01-22 17:36:50 -06:00
Aaron Piotrowski
abaa1609fd
Improve error message for invalid channel data
2018-01-22 16:12:55 -06:00
Aaron Piotrowski
0d40e6da98
Do not fclose socket or null thread ref; restore GC test
2017-12-27 12:36:28 -06:00
Aaron Piotrowski
e6a5de671a
Move GC test to ProcessPoolTest
2017-12-27 12:17:35 -06:00
Aaron Piotrowski
cdf84999aa
Update context test
2017-12-26 23:16:30 -06:00
Niklas Keller
ac4c7939f0
Add test for proper clean up
...
If there are cyclic references in the future again, this test will fail.
2017-12-26 10:02:43 -06:00
Aaron Piotrowski
c545be1dc5
More tests
2017-12-13 23:06:38 -06:00
Aaron Piotrowski
f4411805d6
Fail task with SerializationException; cancel worker if sending otherwise fails
2017-12-13 20:56:28 -06:00
Aaron Piotrowski
9e7d1e0801
Throw if sending task fails
2017-12-13 16:29:44 -06:00