<div dir="ltr"><div><div>I like Gustavo's division - slow tests and fast tests, not unit tests and integration tests.  Certainly, integration tests are often also slow tests, but that's not the division that really matters.</div></div><div><br></div><div><b>I want</b> <font face="courier new, monospace" style="background-color:rgb(238,238,238)">go test <a href="http://github.com/juju/juju/.">github.com/juju/juju/.</a>..</font> <b>to finish in 5 seconds or less.  I want the landing bot to reject commits that cause this to no longer be true.</b></div><div><br></div><div>This is totally doable even on a codebase the size of juju's.  Most tests that don't bring up a server or start mongo finish in milliseconds.<br></div><div><br></div><div>There are many strategies we can use deal with slower tests.  One of those may be "don't run slow tests unless you ask for them".  Another is refactoring code and tests so they don't have to bring up a server/mongo.  Both are good and valid.  <br></div><div><br></div><div>This would make developers more productive.  You can run the fast tests trivially whenever you make a change.  When you're ready to commit, run the long tests to pick up anything the short tests don't cover.<br></div><div><br></div><div>Right now, I cringe before starting to run the tests because they take so long.</div><div><br></div><div>I don't personally care if it's a test flag or an environment variable, hell, why not both? It's trivial either way.  Let's just do it.</div><div><br></div><div>-Nate</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div class="gmail_extra"><br></div></div>