Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron web check fails behat for other plugins #178

Open
sharpchi opened this issue Mar 22, 2024 · 0 comments
Open

Cron web check fails behat for other plugins #178

sharpchi opened this issue Mar 22, 2024 · 0 comments

Comments

@sharpchi
Copy link

I have heartbeat installed in my dev environment. When I run behat tests for other plugins (unless the behatDB is a clean install) I get the following error:

    │
    ╳  debugging() message/s found:
    ╳  
    ╳  HEARTBEAT doing web ping
    ╳  line 177 of /admin/tool/heartbeat/classes/check/cachecheck.php: call to debugging()
    ╳  line 29 of /admin/tool/heartbeat/lib.php: call to tool_heartbeat\check\cachecheck::ping()
    ╳  line 1372 of /lib/outputrenderers.php: call to tool_heartbeat_before_http_headers()
    ╳  line 116 of /index.php: call to core_renderer->header()
    ╳   (Exception)
    │

And this causes my behat tests to fail.

I could uninstall heartbeat on my dev install, but I do like to have all the plugins installed locally so I can identify any cross plugin issues.

Is there any way to stop this happening when running Behat? Perhaps add a check for BEHAT_RUNNING?

function tool_heartbeat_before_http_headers() {
    if (BEHAT_SITE_RUNNING) {
        return;
    }
    if (class_exists('\core\check\manager')) {
        \tool_heartbeat\check\cachecheck::ping('web');
    }
}

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant