HomePhorge

maint: reset more global state in testing faces...
c63e9c2394a3Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

maint: reset more global state in testing faces...

When we query for all faces we need to scan the entire Ruby load path, look
for everything that looks like a face, and load it up. That is a fairly
expensive operation, especially on a platform that has slow I/O.

*cough* EC2 *cough*

Because of that we only scan once, and assume that the list is static
thereafter; this works OK out in the field, but sucks in testing where that
global state gets in the way of the rest of our fiddling under the hood.

This resets the '@loaded' member of the collection additionally, which is what
should be done since we have reset the rest of the collection at the same
time.

We don't bother to reset it, as an extra scan during tests is not a problem.

Reviewed-By: Nick Lewis <nick@puppetlabs.com>

Details

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPUc63e9c2394a3: maint: reset more global state in testing faces... (authored by Daniel Pittman <daniel@puppetlabs.com>).May 3 2011, 12:34 AM