... | ... | @@ -152,6 +152,20 @@ We've given you code that sends RPCs via "UNIX-domain sockets". This means that |
|
|
|
|
|
The easiest way to track down bugs is to insert `log.Printf()` statements, collect the output in a file with `go test > out`, and then think about whether the output matches your understanding of how your code should behave. The last step is the most important.
|
|
|
|
|
|
You will see some error messages that are safe to ignore. These will looks something like this:
|
|
|
```
|
|
|
2016/01/04 11:44:52 method CleanupFiles has wrong number of ins: 1
|
|
|
2016/01/04 11:44:52 method CleanupRegistration has wrong number of ins: 1
|
|
|
2016/01/04 11:44:52 method KillWorkers has wrong number of ins: 1
|
|
|
2016/01/04 11:44:52 method Merge has wrong number of ins: 1
|
|
|
2016/01/04 11:44:52 method ProcessJobs has wrong number of ins: 1
|
|
|
2016/01/04 11:44:52 method Run has wrong number of ins: 1
|
|
|
2016/01/04 11:44:52 method RunMaster has wrong number of ins: 1
|
|
|
2016/01/04 11:44:52 method Split has wrong number of ins: 2
|
|
|
2016/01/04 11:44:52 method StartRegistrationServer has wrong number of ins: 1
|
|
|
```
|
|
|
The important thing to look for is a print out of `PASS` at the end of your output indicating that your implementation has passed all of the unit tests.
|
|
|
|
|
|
**Hint:** Use a `select` to check for new worker registrations as well as checking for finished workers that need new jobs.
|
|
|
|
|
|
**Hint:** When designing, think about how you might handle jobs that do not finish and have to be restarted. This will limit how much re-design you will have to do in the next section when you have to handle worker failures.
|
... | ... | |