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: dlq_service_test.go
    path of file: ./repos/temporal/tools/tdbg
    
    the code of the file until where you have to start completion: // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc.  All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all co
    
func (tc *dlqTestCase) Run(t *testing.T, firstAppRun chan struct{}) {
	p := dlqTestParams{
		dlqVersion:            "v2",
		dlqType:               strconv.Itoa(tasks.CategoryTransfer.ID()),
		sourceCluster:         "test-source-cluster",
		targetCluster:         "test-target-cluster",
		maxMessageCount:       "",
		lastMessageID:         "",
		outputFileName:        "",
		expectedErrSubstrings: nil,
		clientFactory:         faultyClientFactory{err: errors.New("did not expect client to be used")},
	}
	tc.override(&p)
	app := tdbgtest.NewCliApp(func(params *tdbg.Params) {
		params.ClientFactory = p.clientFactory
	})
	runArgs := []string{
		"tdbg",
		"--" + tdbg.FlagYes,
		"dlq",
	}
	runArgs = appendArg(runArgs, tdbg.FlagDLQVersion, p.dlqVersion)
	runArgs = append(runArgs, p.command)
	runArgs = appendArg(runArgs, tdbg.FlagDLQType, p.dlqType)
	runArgs = appendArg(runArgs, tdbg.FlagCluster, p.sourceCluster)
	runArgs = appendArg(runArgs, tdbg.FlagTargetCluster, p.targetCluster)
	runArgs = appendArg(runArgs, tdbg.FlagMaxMessageCount, p.maxMessageCount)
	runArgs = appendArg(runArgs, tdbg.FlagLastMessageID, p.lastMessageID)
	runArgs = appendArg(runArgs, tdbg.FlagOutputFilename, p.outputFileName)

	// TODO: this is a hack to make sure that the first app.Run() call is finished before the second one starts because
	// there is a race condition in the CLI app where all apps share the same help command pointer and try to initialize
	// it at the same time. This workaround only protects the first call because it's ok if subsequent calls happen in
	// parallel since the help command is already initialized.
	_, isFirstRun := <-firstAppRun
	err := app.Run(runArgs)
	if isFirstRun {
		close(firstAppRun)
	}
	if len(p.expectedErrSubstrings) > 0 {
		assert.Error(t, err, "Expected error to contain %v", p.expectedErrSubstrings)
		for _, s := range p.expectedErrSubstrings {
			assert.ErrorContains(t, err, s)
		}
	} else {
		assert.NoError(t, err)
	}
}