create a mix of possible transitions of workers and regular threads
(worker1Path string, worker2Path string)
| 246 | |
| 247 | // create a mix of possible transitions of workers and regular threads |
| 248 | func allPossibleTransitions(worker1Path string, worker2Path string) []func(*phpThread) { |
| 249 | return []func(*phpThread){ |
| 250 | convertToRegularThread, |
| 251 | func(thread *phpThread) { thread.shutdown() }, |
| 252 | func(thread *phpThread) { |
| 253 | if thread.state.Is(state.Reserved) { |
| 254 | thread.boot() |
| 255 | } |
| 256 | }, |
| 257 | func(thread *phpThread) { convertToWorkerThread(thread, workersByPath[worker1Path]) }, |
| 258 | convertToInactiveThread, |
| 259 | func(thread *phpThread) { convertToWorkerThread(thread, workersByPath[worker2Path]) }, |
| 260 | convertToInactiveThread, |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | func TestCorrectThreadCalculation(t *testing.T) { |
| 265 | maxProcs := runtime.GOMAXPROCS(0) * 2 |
no test coverage detected