On Fri, Jul 25, 2014 at 2:37 AM, Ian Booth <ian.bo...@canonical.com> wrote:
> The tests passed for me every time also, with and without independent 
> sessions.
> If I loaded my machine to max out CPU usage to 100%, then the tests (different
> ones each run) would fail intermittently but reproducibly every time with
> session copy, but I could not induce even one failure without session copying.

As I mentioned, it sounds like a concurrency or timing issue, which
isn't really surprising given that the code at hand is indeed time
sensitive, and that session.Copy will alter significantly the timing
characteristics of the test.

This is at the top of the test file:

        // worstCase is used for timeouts when timing out
        // will fail the test. Raising this value should
        // not affect the overall running time of the tests
        // unless they fail.
        worstCase = testing.LongWait

        // justLongEnough is used for timeouts that
        // are expected to happen for a test to complete
        // successfully. Reducing this value will make
        // the tests run faster at the expense of making them
        // fail more often on heavily loaded or slow hardware.
        justLongEnough = testing.ShortWait

        // fastPeriod specifies the period of the watcher for
        // tests where the timing is not critical.
        fastPeriod = 10 * time.Millisecond

        // slowPeriod specifies the period of the watcher
        // for tests where the timing is important.
        slowPeriod = 1 * time.Second


gustavo @ http://niemeyer.net

-- 
Juju-dev mailing list
Juju-dev@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev

Reply via email to