Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 12, 2026

Proposed changes

CI logs are cluttered with keepalive errors (BadServerHalted, BadNoCommunication) during test teardown. These are expected when sessions close during server shutdown and create noise that obscures actual test failures.

Modified ClientFixture.Session_KeepAlive to early-return on these two status codes:

private void Session_KeepAlive(ISession session, KeepAliveEventArgs e)
{
    if (ServiceResult.IsBad(e.Status))
    {
        // Ignore expected errors during test shutdown to reduce noise in CI logs
        if (e.Status?.StatusCode == StatusCodes.BadServerHalted ||
            e.Status?.StatusCode == StatusCodes.BadNoCommunication)
        {
            return;
        }

        m_logger.LogError(
            "Session '{SessionName}' keep alive error: {StatusCode}",
            session.SessionName,
            e.Status?.ToLongString());
    }
}

Other keepalive errors (e.g., BadRequestInterrupted) continue to be logged. Added null-conditional operators for defensive handling.

Related Issues

Issue describes CI logs being full of keepalive error messages during test shutdown.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds functionality)
  • Test enhancement (non-breaking change to increase test coverage)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected, requires version increase of Nuget packages)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc.
  • I have signed the CLA.
  • I ran tests locally with my changes, all passed.
  • I fixed all failing tests in the CI pipelines.
  • I fixed all introduced issues with CodeQL and LGTM.
  • I have added tests that prove my fix is effective or that my feature works and increased code coverage.
  • I have added necessary documentation (if appropriate).
  • Any dependent changes have been merged and published in downstream modules.

Further comments

Change is test-only and does not affect production code behavior. No additional tests needed - existing tests verify the fix works (logs are clean on shutdown).

Original prompt

This section details on the original issue you should resolve

<issue_title>[Tests] CI Logs are full of LogMessages like Keepalive Error BadSeverhalted / BadNoCommunication</issue_title>
<issue_description>CI Logs are full of LogMessages like Keepalive Error BadSeverhalted / BadNoCommunication.

Those should be ignored by the TestLogger on Test shutdown, to better spot real test errors.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI changed the title [WIP] Fix TestLogger to ignore keepalive error messages Suppress expected keepalive errors during test shutdown Jan 12, 2026
Copilot AI requested a review from romanett January 12, 2026 05:11
@romanett romanett marked this pull request as ready for review January 12, 2026 05:12
@marcschier marcschier merged commit 0713e8f into master Jan 12, 2026
110 of 111 checks passed
@romanett romanett deleted the copilot/fix-test-logger-ignoring-errors branch January 12, 2026 17:29
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

Successfully merging this pull request may close these issues.

[Tests] CI Logs are full of LogMessages like Keepalive Error BadSeverhalted / BadNoCommunication

4 participants