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

[Pulp-list] Unittests not cleaning up & sending events on regular bus pulp listens to



When running the unittests garbage is being leftover in the mongo database, "_database". (Note: we are using 2 mongo databases, "_database" for regular pulp and "pulp_unittest" for unit tests)

The tricky part is the unittests are connecting to "pulp_unittest".  I've been a bit puzzled as to what was creating the entries in "_database".  

I noticed I only see this problem when pulp is running under apache and I run the unittests.
It looks like pulp under apache is receiving a "repo.created" event generated by the unit tests, pulp then proceeds to create a repo for this.  

I believe this explains why the repo information isn't being cleaned up.  The unittests are running against "pulp_unittest", so all of the clean methods are cleaning that database connection.  The unittests leave "_database" alone.

I don't think we realized this behavior in the past because the unit tests were using the same database as pulp, so clean was removing everything.

 
Should the unit tests be allowed to send an event on the bus?  I'm thinking No.  Or at the least if we want to test sending events around, lets override the config so this is talking to a separate test setup that won't impact any running instances?  Any thoughts?





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