Skip to content

Commit

Permalink
Fix flaky git.TestForwardServer test (#51112)
Browse files Browse the repository at this point in the history
  • Loading branch information
greedy52 committed Jan 16, 2025
1 parent d2c55aa commit 6d47f25
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/srv/git/forward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ func TestForwardServer(t *testing.T) {

test.verifyWithClient(t, ctx, client, mockGitService)
if test.verifyEvent != nil {
// Server emits exec event after sending result to client.
require.EventuallyWithT(t, func(t *assert.CollectT) {
assert.NotNil(t, mockEmitter.LastEvent())
}, time.Second*2, time.Millisecond*100, "Timeout waiting for audit event.")
test.verifyEvent(t, mockEmitter.LastEvent())
}
})
Expand Down

0 comments on commit 6d47f25

Please sign in to comment.