[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Pulp-list] Hanging unit tests and logs.py

Hash: SHA1


I still maintain that the logging configuration is busted, but the
reason the tests suddenly started hanging is because of a change to the

lifetime: 0

Removing this line makes them work again.

FYI, I tried disabling the call to start_logging in the tests. That made
Hudson pass again, taking 51 seconds (normal builds are ~5 minutes). So
I still think we should clean up the stop_logging call, but for now the
bigger issue of our tests not running has been fixed.

If that auditing config change was intentional, it'll have to be fixed
and readded. I'm removing it to get the tests running again.

On 09/10/2010 09:32 AM, Jason Dobies wrote:
> I think there's an issue with how our logs.py sets up logging.
> It has a start and stop function, using a global variable to prevent
> multiple starts without a stop in between. The problem is, the stop
> doesn't properly clean up the configuration that's done in the start
> method. So each time it's stopped/started, we add all the handlers back
> onto the loggers.
> This shouldn't be a problem (currently) in the running code since it's
> only started in the application bootstrap. However our unit tests are
> badly broken. I noticed in the debugger that there were a ton of
> duplicate handlers on loggers when running tests. The stop/start process
> is tied to each time the configuration is loaded in a test, which is
> done in setUp. Since that's called once for each test, it's causing our
> logging configuration to blow up by the end of the test runs. As of
> right now, the test_consumer_history_api tests hang for both me and John
> Matthews. They run fine when I comment out the testutil.start_logging()
> call.
> This might also explain why Hudson is hung right now (current build has
> been going for 15h). Python seems to get especially confused in the
> auditing logging configuration since it's adding a bunch of
> TimedRotatingFileHandlers. I'm curious if it
> I'll file a high priority bug for it since it's stopping our tests and
> builds from running. I'm not 100% sure of the fix, but the issue looks
> to be that our stop/start logging calls are bugged.

- -- 
Jason Dobies
RHCE# 805008743336126
Freenode: jdob
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]