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

Jason Dobies jason.dobies at redhat.com
Fri Sep 10 13:41:57 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Update:

I still maintain that the logging configuration is busted, but the
reason the tests suddenly started hanging is because of a change to the
test-override-pulp.conf:

[auditing]
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMijWkAAoJEOMmcTqOSQHCGEQIAIYtgSBU7xMYWYor516200t8
e9QeMWPqzExgWwLzTtM1PMJLxUmLn/0zal3DbsC8V/9xhdE011lmYjMQz2hG21Vw
mZc6fsLwpDJHyD2p6G8NdSUv+nf62hsBaB7Pjt6JDzjQlGcl7fxMkqv1DzngvZDK
Df+qxT020xtSDmgW3NEOetDoMa350cCjfxNWeO8qfXwN2cgfC2206ZWVuazqVD0x
jleKd5+DNnAUo7hA9nf7WSIu+HXvtxhtpl2l1KLoZGlozu/SOtNTK+pzVIxUsi1X
WvPeZa1Dvnn9Poiy+lNYxJLet5UCwJtAhjEFTpYcwpjG13/ln2QEfqkeAjFJjyA=
=wWA8
-----END PGP SIGNATURE-----




More information about the Pulp-list mailing list