Skip to content

Commit

Permalink
Merge pull request #106188 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.1-105921

release-23.1: changefeedccl: Deflake TestWebhookSinkWithAuthOptions
samiskin authored Jul 5, 2023
2 parents 3f366b6 + a4f7420 commit 6f85293
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/ccl/changefeedccl/sink_webhook_test.go
Original file line number Diff line number Diff line change
@@ -106,7 +106,13 @@ func testSendAndReceiveRows(t *testing.T, sinkSrc Sink, sinkDest *cdctest.MockWe
require.NoError(t, sinkSrc.EmitRow(ctx, nil, []byte("[1001]"), []byte("{\"after\":{\"col1\":\"val1\",\"rowid\":1000},\"key\":[1001],\"topic:\":\"foo\"}"), zeroTS, zeroTS, pool.alloc()))
require.NoError(t, sinkSrc.EmitRow(ctx, nil, []byte("[1001]"), []byte("{\"after\":{\"col1\":\"val1\",\"rowid\":1002},\"key\":[1001],\"topic:\":\"foo\"}"), zeroTS, zeroTS, pool.alloc()))
require.NoError(t, sinkSrc.Flush(ctx))
require.EqualValues(t, 0, pool.used())
testutils.SucceedsSoon(t, func() error {
remaining := pool.used()
if remaining == 0 {
return nil
}
return errors.Newf("waiting for 0 allocs (%d)", remaining)
})

require.Equal(t,
"{\"payload\":[{\"after\":{\"col1\":\"val1\",\"rowid\":1002},\"key\":[1001],\"topic:\":\"foo\"}],\"length\":1}", sinkDest.Latest(),

0 comments on commit 6f85293

Please sign in to comment.