Tyler Romeo <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #3 from Tyler Romeo <> ---
Well the call to FakeLBFactory::destroyInstance() is a bit misleading, since
FakeLBFactory does not actually have a static method destroyInstance(). In
fact, the usage of FakeLBFactory at all is strange, considering all the static
methods (i.e., the methods that are being tested), are in the parent class. The
function is actually LBFactory::destroyInstance(), which, not surprisingly,
causes the database to be shut down. Since the unit test tables are temporary,
that explains the error.

In the end, the global state is pretty, well, global. Right now there is no way
in LBFactory to change the singleton without destroying the existing object
(which is quite intended since it *is* singleton). So that leaves us with two

1) Change the test so that it only tests LBFactory::getLBFactoryClass() rather
than the actual LBFactory::singleton() function; or
2) Remove the test, because why are we testing deprecated features?

Also, let me just say I spent a good five minutes trying to figure out why I
was seeing "FakeLBFactory" in some places and "LBFactoryFake" in others. Naming
the mock class like that was a terrible idea.

You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
Wikibugs-l mailing list

Reply via email to