Closed ce1ebrimbor closed 6 years ago
While executing this test, seldom it gives a positive result (The conditions are met to create the failure):
TKTCommonQueueWorkerPoolTests >>> testWorkerPoolDoesNotExceedPoolSizeWhenSchedulingTasksInParallel <expectedFailure> | pool totalTasks futures | pool := TKTCommonQueueWorkerPool new. pool poolMaxSize: 10. pool start. totalTasks := 0. futures := AtomicSharedQueue new. 1 to: 10 do: [ :i | futures nextPut: (pool future: [ 10 timesRepeat: [ futures nextPut: (pool future: [ totalTasks := totalTasks + 1 ]) ] ]) ]. [ futures isEmpty ] whileFalse: [ futures next waitForCompletion: 100 milliSeconds ]. self assert: totalTasks equals: 100. self assert: pool size equals: 10
I think there might be an issue linked to the time delays.
Hi Daniel!
Me my self i added that to finish the integration (since it was not a show stopper) I am working on making the addition of a new worker safe for mt.
While executing this test, seldom it gives a positive result (The conditions are met to create the failure):
I think there might be an issue linked to the time delays.