[FIX] Wait a few seconds for the garbage collector before checking the state of the environment in the 'TestEnvironment.test_env_dirty' unit test