apm
apm copied to clipboard
Add unit tests for Watcher and Master
- [x] Create interfaces for ProcPreparable and ProcContainer. PR #3
- [ ] Create ProcPreparable and ProcContainer mock instances
- [ ] Implement unit tests for Watcher
- [ ] Implement unit tests for Master
Creating interfaces for ProcPreparable, ProcContainer and file_util is essential to make unit testing easier. After that we can easily create mock instances and apply it on master and watcher. The tests should mainly test the following:
- Starting processes serially
- Starting processes in parallel
- Killing processes serially
- Killing processes in parallel
- Killing keep-alive processes
- Killing non-keep-alive processes
- Trying to build non-compilable projects
The main idea is to test how APM behaves when facing possible race condition situations and how it handle errors.