Closed Jacobs63 closed 6 months ago
Oh good catch @Jacobs63! Let me check this out. Appreciate the detailed bug report 🙏
Ok I've just released v3.6.4 with a patch for this.
You should definitely only have to execute DirectoryEmulator::tearDown()
to tear down the whole LdapRecord test suite 👍
Run composer update
and you're all set! Thanks again @Jacobs63 🙏
Hello,
confirming the latest release fixes this issue, thank you for the quick fix!
Awesome! Thanks for letting me know @Jacobs63 🙏
Environment:
Describe the bug:
Whenever a new PHPUnit test is started, the
LdapServiceProvider
adds logging via a wildcard event listener to\LdapRecord\Events\Dispatcher
. Since these listeners are not flushed, this accumulates to over a thousand listeners when running my entire test suite, dramatically slowing the testing process.I did not notice this being pointed anywhere in the
Testing
section of the application.The current workaround I found to be working is to call
Container::getInstance()->getConnectionManager()->flush()
during the tearDown process on every test case.Is that the correct approach, or should I call something else? Running
DirectoryEmulator::tearDown
has no effect here.