You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: output_retry_test.go
    path of file: ./repos/benthos/internal/impl/pure
    
    the code of the file until where you have to start completion: package pure

import (
	"context"
	"errors"
	"testing"
	"time"

	"github.com/Jeffail/gabs/v2"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"

	"github.com/benthosdev/benthos/v4/internal/bundle"
	"github.com/benthosdev/benthos/v4/internal/component"
	"github.com/benthosdev/benthos/v4/internal/manager/mock"
	"github.com/benthosdev/benthos/v4/internal/message"
)

func TestRetryConfigErrs(t *testing.T) {
    
func TestRetrySadPath(t *testing.T) {
	ctx, done := context.WithTimeout(context.Background(), time.Second*30)
	defer done()

	conf := parseYAMLOutputConf(t, `
retry:
  output:
    drop: {}
  backoff:
    initial_interval: 10us
    max_interval: 10us
`)

	output, err := bundle.AllOutputs.Init(conf, mock.NewManager())
	if err != nil {
		t.Fatal(err)
	}

	ret, ok := output.(*indefiniteRetry)
	if !ok {
		t.Fatal("Failed to cast")
	}

	mOut := &mock.OutputChanneled{}
	ret.wrapped = mOut

	tChan := make(chan message.Transaction)
	resChan := make(chan error)

	if err = ret.Consume(tChan); err != nil {
		t.Fatal(err)
	}

	testMsg := message.QuickBatch(nil)
	tran := message.NewTransaction(testMsg, resChan)

	go func() {
		select {
		case tChan <- tran:
		case <-time.After(time.Second):
			t.Error("timed out")
		}
	}()

	for i := 0; i < 100; i++ {
		select {
		case tran = <-mOut.TChan:
		case <-resChan:
			t.Fatal("Received response not retry")
		case <-time.After(time.Second):
			t.Fatal("timed out")
		}

		assertEqualMsg(t, tran.Payload, testMsg)
		require.NoError(t, tran.Ack(ctx, component.ErrFailedSend))
	}

	select {
	case tran = <-mOut.TChan:
	case <-resChan:
		t.Fatal("Received response not retry")
	case <-time.After(time.Second):
		t.Fatal("timed out")
	}

	assertEqualMsg(t, tran.Payload, testMsg)
	require.NoError(t, tran.Ack(ctx, nil))

	select {
	case res := <-resChan:
		if err = res; err != nil {
			t.Error(err)
		}
	case <-time.After(time.Second):
		t.Fatal("timed out")
	}

	output.TriggerCloseNow()
	require.NoError(t, output.WaitForClose(ctx))
}