Greg, I think the "clock magic" is key to speed up most of the test, I'm glad you raised that point. Moreover, in case some folks haven't noticed that already, we have a doc describing some useful testing patterns: testing-patterns.md. It would be great if when working on these tickets we update and enrich this doc as well.
Regarding MESOS-4101 — an interesting and bold idea, it would be great to capture pros & cons and think about potential implications or caveats it may bring. On Wed, Dec 16, 2015 at 8:29 PM, Neil Conway <[email protected]> wrote: > +1 on the speed-up-the-tests project! > > On Wed, Dec 16, 2015 at 10:29 AM, Greg Mann <[email protected]> wrote: > > I'd like to bring up something that both Neil and Joseph mentioned to me > > recently, which could be of use when working on these slow test tickets. > > Since we have the `process::Clock` class, it's quite easy to control the > > clock manually, and doing so can both speed up tests as well as make them > > more deterministic/less flaky. While we're working on the above tickets, > I > > think it would be nice to look for opportunities to alter the tests we're > > touching to pause the clock and then advance it explicitly using > `pause()`, > > `settle()`, and `advance()`, rather than letting it run as usual. > > Yep -- I think eventually having the clock paused by default for tests > would probably be a good idea: > > https://issues.apache.org/jira/browse/MESOS-4101 > > To make that happen, we might need a few more primitives to force > "pending" events to be processed before manually advancing the clock. > `Clock::settle()` works for libprocess messages, but not for socket > communication more generally (e.g., when using the HTTP API). It would > help to get rid of this kludge in `Clock::settle` as well: > > https://issues.apache.org/jira/browse/MESOS-3760 > > Neil >
