go test github.com/juju/juju/state takes > 10 minutes to run
roger peppe
roger.peppe at canonical.com
Fri May 20 14:02:01 UTC 2016
BTW under Windows, it looks even worse - it's sleeping for 200ms every time
around a loop that runs for 20000 iterations, so that'll take 6m40s without
anything else taken into account. ISTM that this is a place where a
little judicious fakery
might go a long way.
On 20 May 2016 at 13:53, Horacio Duran <horacio.duran at canonical.com> wrote:
> Uh, ill take a look at that, I am the author of said test
>
> On Fri, May 20, 2016 at 6:50 AM, roger peppe <roger.peppe at canonical.com>
> wrote:
>>
>> The state tests "only" take 10m26s for me.
>>
>> I built a thing to analyse gocheck output
>> https://play.golang.org/p/veBCtrmmPR
>> and used it on the state test output.
>>
>> total suites 94
>> total test time 10m25.752s
>> total suite time 10m26.033s
>> total setup test 3m4.727s
>> total teardown test 14.277s
>> total setup suite 89ms
>> total teardown suite 17.496s
>> total fixture overhead 3m36.589s
>> longest test 1m39.423s (
>> StatusHistorySuite.TestPruneStatusHistoryBySize) setup 135ms teardown
>> 4ms
>> overall time 10m26.078s
>>
>> Surely TestPruneStatusHistoryBySize doesn't *really* need to take all that
>> time?
>>
>> If you want to play around with the code, it expects as input the output
>> from timestamp (go get github.com/rogpeppe/misc/cmd/timestamp).
>>
>> e.g.
>>
>> go test -check.vv 2>&1 | timestamp > statetest.out
>> parsegocheck < statetest.out
>>
>>
>>
>> On 17 May 2016 at 03:52, David Cheney <david.cheney at canonical.com> wrote:
>> > Testing this package takes 16 minutes on my machine*; it sure didn't
>> > use to take this long.
>> >
>> > What happened ?
>> >
>> > * yes, you have to raise the _10 minute_ timeout to make this test run.
>> >
>> > --
>> > Juju-dev mailing list
>> > Juju-dev at lists.ubuntu.com
>> > Modify settings or unsubscribe at:
>> > https://lists.ubuntu.com/mailman/listinfo/juju-dev
>>
>> --
>> Juju-dev mailing list
>> Juju-dev at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
>
More information about the Juju-dev
mailing list