31
}
32
33
>
func GetQueueKey(t *testing.T, opts ...func(p *getQueueKeyParams)) persistence.QueueKey {
queues.go
34
>
params := &getQueueKeyParams{
35
>
QueueType: persistence.QueueTypeHistoryNormal,
36
>
Category: tasks.CategoryTransfer,
37
>
}
38
>
for _, opt := range opts {
39
opt(params)
40
}
41
// Note that it is important to include the test name in the cluster name to ensure that the generated queue name is
42
// unique across tests. That way, we can run many queue tests without any risk of queue name collisions.
44
>
QueueType: params.QueueType,
45
>
Category: params.Category,
46
>
SourceCluster: "src-" + t.Name(),
47
>
TargetCluster: "tgt-" + t.Name(),
48
>
}
49
}
50