<div dir="ltr">Thanks for your thoughts Radomir. The nova api in question is memoized so it'll only be called once per request. Caching it for longer would be a very good idea, but that then brings into play deeper knowledge than I have about how long to cache things like nova extension configuration. Also, I looked into this see whether we could use a nicer existing memoizing system (one with a timeout, that doesn't use weakref and will clean out stale entries), but none of them will handle the existence of the varying request parameter, so more work would be required to build our own solution. It's still something I'd like to see done.<div>
<br></div><div>But that's not really the point of this email, as you note :)</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 29 August 2014 19:46, Radomir Dopieralski <span dir="ltr"><<a href="mailto:openstack@sheep.art.pl" target="_blank">openstack@sheep.art.pl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 29/08/14 04:22, Richard Jones wrote:<br>
<br>
<br>
> Very recently I attempted to fix a simple bug in which a Panel was being<br>
> displayed when it shouldn't have been. The resultant 5-line fix ended up<br>
> breaking 498 of the 1048 unit tests in the suite. I estimated that it<br>
> would take about a week's effort to address all the failing tests. For<br>
> more information see<br>
> <<a href="http://mechanicalcat.net/richard/log/Python/When_testing_goes_bad" target="_blank">http://mechanicalcat.net/richard/log/Python/When_testing_goes_bad</a>><br>
<br>
</div>Having read that, I can't help but comment that maybe, just maybe,<br>
making an API call on each an every request to Horizon is not such a<br>
great idea after all, and should be very well thought out, as it is<br>
costly. In particular, it should be investigated if the call could be<br>
made only on some requests? That would have the side effect of breaking<br>
much fewer tests.<br>
<br>
But I agree that mox is horrible in that it effectively freezes the<br>
implementation details of the tested unit, instead of testing its behavior.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Radomir Dopieralski<br>
<br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</font></span></blockquote></div><br></div>