Test case runner
Problem Statement
We have N test cases that need to be scheduled for execution. These test cases may have dependencies — for example, test case T1 might need to run before T2 and T3. However, we don’t need to manually manage these dependencies, as we’re already provided with a method:
1List<Task> getNextTasks(List<Task> executedTasks)This method takes a list of executed tasks and returns the list of tasks that are ready to be scheduled next (i.e., their dependencies are satisfied).
Our goal is to execute all tasks in parallel, respecting their dependencies.
Error Handling
If any test case fails during execution, the entire pipeline should be aborted immediately. That is, a failure in any child thread should signal the parent thread to stop further execution.
Follow-up Questions
You don't have to use executor pool etc. use plain locks, signals, and wait/await