apitest.go ×4

Frontier kind: Code frontier

unlabeled · c_fcd2c4c15eb4

6 tests · 3154 LOC · 157 files · introduces 0 tests · 57 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges57 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
492 ranges3154 lines · 157 files · Browse complete extent
All tests (intent)
6 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

3 files ranked by introduced lines: 57 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/api/listqueues/listqueuestest/apitest.go 41 introduced LOC · 4 ranges

Open complete file

20 ctx := context.Background()
21 t.Run("HappyPath", func(t *testing.T) {
22 > inTask := &tasks.WorkflowTask{ apitest.go
23 > TaskID: 42,
24 > }
25 > sourceCluster := "test-source-cluster-" + t.Name()
26 > targetCluster := "test-target-cluster-" + t.Name()
27 > queueType := persistence.QueueTypeHistoryDLQ
28 > var queueKeys []persistence.QueueKey
29 > for i := range 3 {
30 > queueKey := persistence.QueueKey{
31 > QueueType: queueType,
32 > Category: inTask.GetCategory(),
33 > SourceCluster: sourceCluster + strconv.Itoa(i),
34 > TargetCluster: targetCluster + strconv.Itoa(i),
35 > }
36 > queueKeys = append(queueKeys, queueKey)
37 > _, err := manager.CreateQueue(ctx, &persistence.CreateQueueRequest{QueueKey: queueKey})
38 > require.NoError(t, err)
39 > }
40
41 > var listedQueueNames []string apitest.go
42 > var nextPageToken []byte
43 > for i := int32(1); ; i++ {
44 > res, err := listqueues.Invoke(
45 > context.Background(),
46 > manager,
47 > &historyservice.ListQueuesRequest{
48 > QueueType: int32(queueType),
49 > PageSize: i,
50 > NextPageToken: nextPageToken,
51 > },
52 > )
53 > require.NoError(t, err)
54 > for _, queue := range res.Queues {
55 > listedQueueNames = append(listedQueueNames, queue.QueueName)
56 >
57 > }
58 > if len(res.NextPageToken) == 0 {
59 > break
60 }
61 > nextPageToken = res.NextPageToken apitest.go
62 }
63 > for _, queueKey := range queueKeys { apitest.go
64 > require.Contains(t, listedQueueNames, queueKey.GetQueueName())
65 > }
66 })
67 t.Run("InvalidPageSize", func(t *testing.T) {
go.temporal.io/server/service/history/api/listqueues/api.go 12 introduced LOC · 1 range

Open complete file

30 return nil, serviceerror.NewUnavailablef("ListQueues failed. Error: %v", err)
31 }
32 > var queues []*historyservice.ListQueuesResponse_QueueInfo api.go
33 > for _, queue := range resp.Queues {
34 > queues = append(queues, &historyservice.ListQueuesResponse_QueueInfo{
35 > QueueName: queue.QueueName,
36 > MessageCount: queue.MessageCount,
37 > LastMessageId: queue.LastMessageID,
38 > })
39 > }
40 > return &historyservice.ListQueuesResponse{
41 > Queues: queues,
42 > NextPageToken: resp.NextPageToken,
43 > }, nil
44 }
go.temporal.io/server/common/persistence/history_task_queue_manager.go 4 introduced LOC · 1 range

Open complete file

218 return nil, err
219 }
220 > return &ListQueuesResponse{ history_task_queue_manager.go
221 > Queues: resp.Queues,
222 > NextPageToken: resp.NextPageToken,
223 > }, nil
224 }
225