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: helper_test.go
    path of file: ./repos/client/go/chat
    
    the code of the file until where you have to start completion: package chat

import (
	"testing"

	"github.com/keybase/client/go/chat/globals"
	"github.com/keybase/cl
    
func TestTopicNameRace(t *testing.T) {
	runWithMemberTypes(t, func(mt chat1.ConversationMembersType) {
		switch mt {
		case chat1.ConversationMembersType_KBFS:
			return
		default:
			// Nothing to do for other member types.
		}
		ctc := makeChatTestContext(t, "TestTopicNameRace", 1)
		defer ctc.cleanup()
		users := ctc.users()

		ctx := ctc.as(t, users[0]).startCtx
		ri := ctc.as(t, users[0]).ri
		tc := ctc.world.Tcs[users[0].Username]
		uid := users[0].User.GetUID().ToBytes()
		t.Logf("uid: %s", uid)
		first := mustCreateConversationForTest(t, ctc, users[0], chat1.TopicType_DEV, mt)

		// spam create conversation with same name
		type ncRes struct {
			convID chat1.ConversationID
			err    error
		}
		topicName := "LOSERS"
		attempts := 2
		retCh := make(chan ncRes, attempts)
		for i := 0; i < attempts; i++ {
			go func() {
				ctx = globals.CtxAddLogTags(ctx, tc.Context())
				conv, _, err := NewConversation(ctx, tc.Context(), uid, first.TlfName, &topicName,
					chat1.TopicType_DEV, mt, keybase1.TLFVisibility_PRIVATE, nil,
					func() chat1.RemoteInterface { return ri }, NewConvFindExistingNormal)
				retCh <- ncRes{convID: conv.GetConvID(), err: err}
			}()
		}
		var convID chat1.ConversationID
		for i := 0; i < attempts; i++ {
			res := <-retCh
			require.NoError(t, res.err)
			if convID.IsNil() {
				convID = res.convID
			} else {
				require.Equal(t, convID, res.convID)
			}
		}
	})
}