diego-ssh: update loggregator-down test for non-blocking dial (tnz-96…#1142
Merged
Conversation
…145) diego-logging-client (tnz-96145) removed grpc.WithBlock() from NewIngressClient, making the loggregator dial non-blocking. ssh-proxy now starts successfully even when the loggregator server is unavailable and retries the connection in the background. The test "when the loggregator server isn't up → exits with non-zero status code" expected the old blocking behaviour. With the non-blocking dial ssh-proxy never exits, causing the test to time out. Update the assertion to verify the new correct behaviour: ssh-proxy starts and keeps running when the loggregator server is temporarily unavailable. Co-authored-by: Cursor <cursoragent@cursor.com>
kart2bc
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a test that became invalid after the non-blocking loggregator dial change (tnz-96145) landed in diego-logging-client.
Why this PR is necessary
cloudfoundry/diego-logging-client# (tnz-96145) removed grpc.WithBlock() and grpc.WithTimeout() from NewIngressClient, making the loggregator gRPC dial non-blocking (lazy). Previously, if the loggregator server was unavailable at startup, NewIngressClient returned an error after a 1-second dial timeout, ssh-proxy logged
"failed-to-initialize-metron-client", and exited with a non-zero status.
With the lazy dial, the call always succeeds immediately and ssh-proxy starts normally, retrying the connection to the loggregator server in the background.
The test:
"SSH proxy / authenticating with the diego realm metrics / when the loggregator server isn't up / exits with non-zero status code"
used:
Eventually(process.Wait()).Should(Receive(HaveOccurred()))This now times out because ssh-proxy no longer exits when the loggregator server is unavailable. The assertion is changed to:
Consistently(process.Wait()).ShouldNot(Receive())which correctly describes the new behaviour: ssh-proxy starts successfully and keeps running when the loggregator server is temporarily unavailable.
Prior work
Backward Compatibility
Breaking Change? No
Test-only change. No production code, BOSH jobs, or manifests are modified. The new behaviour (ssh-proxy starts successfully when the loggregator server is transiently unavailable and reconnects lazily) is the intended outcome of the diego-logging-client change and improves startup resilience during BOSH rolling upgrades.