Skip to content

Commit 207c96f

Browse files
committed
update testcase.
1 parent 74b4709 commit 207c96f

File tree

2 files changed

+36
-21
lines changed

2 files changed

+36
-21
lines changed

test/plugin/scenarios/elasticsearch-7.x-scenario/config/expectedData.yaml

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ segmentItems:
128128
- {key: transmission.latency, value: not null}
129129
refs:
130130
- {parentEndpoint: 'GET:/elasticsearch-case/case/elasticsearch', networkAddress: '',
131-
refType: CrossThread, parentSpanId: 12, parentTraceSegmentId: not null,
131+
refType: CrossThread, parentSpanId: 13, parentTraceSegmentId: not null,
132132
parentServiceInstance: not null, parentService: elasticsearch-7.x-scenario,
133133
traceId: not null}
134134
- segmentId: not null
@@ -149,7 +149,7 @@ segmentItems:
149149
- {key: transmission.latency, value: not null}
150150
refs:
151151
- {parentEndpoint: 'GET:/elasticsearch-case/case/elasticsearch', networkAddress: '',
152-
refType: CrossThread, parentSpanId: 14, parentTraceSegmentId: not null,
152+
refType: CrossThread, parentSpanId: 15, parentTraceSegmentId: not null,
153153
parentServiceInstance: not null, parentService: elasticsearch-7.x-scenario,
154154
traceId: not null}
155155
- segmentId: not null
@@ -170,7 +170,7 @@ segmentItems:
170170
- {key: transmission.latency, value: not null}
171171
refs:
172172
- {parentEndpoint: 'GET:/elasticsearch-case/case/elasticsearch', networkAddress: '',
173-
refType: CrossThread, parentSpanId: 16, parentTraceSegmentId: not null,
173+
refType: CrossThread, parentSpanId: 17, parentTraceSegmentId: not null,
174174
parentServiceInstance: not null, parentService: elasticsearch-7.x-scenario,
175175
traceId: not null}
176176
- segmentId: not null
@@ -191,7 +191,7 @@ segmentItems:
191191
- {key: transmission.latency, value: not null}
192192
refs:
193193
- {parentEndpoint: 'GET:/elasticsearch-case/case/elasticsearch', networkAddress: '',
194-
refType: CrossThread, parentSpanId: 18, parentTraceSegmentId: not null,
194+
refType: CrossThread, parentSpanId: 19, parentTraceSegmentId: not null,
195195
parentServiceInstance: not null, parentService: elasticsearch-7.x-scenario,
196196
traceId: not null}
197197
- segmentId: not null
@@ -212,7 +212,7 @@ segmentItems:
212212
- {key: transmission.latency, value: not null}
213213
refs:
214214
- {parentEndpoint: 'GET:/elasticsearch-case/case/elasticsearch', networkAddress: '',
215-
refType: CrossThread, parentSpanId: 20, parentTraceSegmentId: not null,
215+
refType: CrossThread, parentSpanId: 21, parentTraceSegmentId: not null,
216216
parentServiceInstance: not null, parentService: elasticsearch-7.x-scenario,
217217
traceId: not null}
218218
- segmentId: not null
@@ -357,7 +357,7 @@ segmentItems:
357357
tags:
358358
- {key: db.type, value: Elasticsearch}
359359
- {key: db.instance, value: not null}
360-
- operationName: Elasticsearch/GetRequest
360+
- operationName: Elasticsearch/RefreshRequest
361361
parentSpanId: 0
362362
spanId: 11
363363
spanLayer: Database
@@ -371,7 +371,6 @@ segmentItems:
371371
tags:
372372
- {key: db.type, value: Elasticsearch}
373373
- {key: db.instance, value: not null}
374-
- {key: db.statement, value: not null}
375374
- operationName: Elasticsearch/GetRequest
376375
parentSpanId: 0
377376
spanId: 12
@@ -387,7 +386,7 @@ segmentItems:
387386
- {key: db.type, value: Elasticsearch}
388387
- {key: db.instance, value: not null}
389388
- {key: db.statement, value: not null}
390-
- operationName: Elasticsearch/SearchRequest
389+
- operationName: Elasticsearch/GetRequest
391390
parentSpanId: 0
392391
spanId: 13
393392
spanLayer: Database
@@ -417,7 +416,7 @@ segmentItems:
417416
- {key: db.type, value: Elasticsearch}
418417
- {key: db.instance, value: not null}
419418
- {key: db.statement, value: not null}
420-
- operationName: Elasticsearch/UpdateRequest
419+
- operationName: Elasticsearch/SearchRequest
421420
parentSpanId: 0
422421
spanId: 15
423422
spanLayer: Database
@@ -447,7 +446,7 @@ segmentItems:
447446
- {key: db.type, value: Elasticsearch}
448447
- {key: db.instance, value: not null}
449448
- {key: db.statement, value: not null}
450-
- operationName: Elasticsearch/AnalyzeRequest
449+
- operationName: Elasticsearch/UpdateRequest
451450
parentSpanId: 0
452451
spanId: 17
453452
spanLayer: Database
@@ -460,7 +459,7 @@ segmentItems:
460459
skipAnalysis: false
461460
tags:
462461
- {key: db.type, value: Elasticsearch}
463-
- {key: analyzer, value: not null}
462+
- {key: db.instance, value: not null}
464463
- {key: db.statement, value: not null}
465464
- operationName: Elasticsearch/AnalyzeRequest
466465
parentSpanId: 0
@@ -477,7 +476,7 @@ segmentItems:
477476
- {key: db.type, value: Elasticsearch}
478477
- {key: analyzer, value: not null}
479478
- {key: db.statement, value: not null}
480-
- operationName: Elasticsearch/DeleteRequest
479+
- operationName: Elasticsearch/AnalyzeRequest
481480
parentSpanId: 0
482481
spanId: 19
483482
spanLayer: Database
@@ -490,7 +489,8 @@ segmentItems:
490489
skipAnalysis: false
491490
tags:
492491
- {key: db.type, value: Elasticsearch}
493-
- {key: db.instance, value: not null}
492+
- {key: analyzer, value: not null}
493+
- {key: db.statement, value: not null}
494494
- operationName: Elasticsearch/DeleteRequest
495495
parentSpanId: 0
496496
spanId: 20
@@ -505,12 +505,26 @@ segmentItems:
505505
tags:
506506
- {key: db.type, value: Elasticsearch}
507507
- {key: db.instance, value: not null}
508-
- operationName: Elasticsearch/IndexRequest
508+
- operationName: Elasticsearch/DeleteRequest
509509
parentSpanId: 0
510510
spanId: 21
511511
spanLayer: Database
512512
startTime: not null
513513
endTime: not null
514+
componentId: 77
515+
isError: false
516+
spanType: Exit
517+
peer: not null
518+
skipAnalysis: false
519+
tags:
520+
- {key: db.type, value: Elasticsearch}
521+
- {key: db.instance, value: not null}
522+
- operationName: Elasticsearch/IndexRequest
523+
parentSpanId: 0
524+
spanId: 22
525+
spanLayer: Database
526+
startTime: not null
527+
endTime: not null
514528
componentId: 48
515529
isError: false
516530
spanType: Exit
@@ -525,7 +539,7 @@ segmentItems:
525539
- {key: db.statement, value: not null}
526540
- operationName: Elasticsearch/actionGet
527541
parentSpanId: 0
528-
spanId: 22
542+
spanId: 23
529543
spanLayer: Unknown
530544
startTime: not null
531545
endTime: not null
@@ -539,7 +553,7 @@ segmentItems:
539553
- {key: db.statement, value: not null}
540554
- operationName: Elasticsearch/GetRequest
541555
parentSpanId: 0
542-
spanId: 23
556+
spanId: 24
543557
spanLayer: Database
544558
startTime: not null
545559
endTime: not null
@@ -557,7 +571,7 @@ segmentItems:
557571
- {key: db.statement, value: not null}
558572
- operationName: Elasticsearch/SearchRequest
559573
parentSpanId: 0
560-
spanId: 24
574+
spanId: 25
561575
spanLayer: Database
562576
startTime: not null
563577
endTime: not null
@@ -575,7 +589,7 @@ segmentItems:
575589
- {key: db.statement, value: not null}
576590
- operationName: Elasticsearch/actionGet
577591
parentSpanId: 0
578-
spanId: 25
592+
spanId: 26
579593
spanLayer: Unknown
580594
startTime: not null
581595
endTime: not null
@@ -591,7 +605,7 @@ segmentItems:
591605
- {key: db.statement, value: not null}
592606
- operationName: Elasticsearch/UpdateRequest
593607
parentSpanId: 0
594-
spanId: 26
608+
spanId: 27
595609
spanLayer: Database
596610
startTime: not null
597611
endTime: not null
@@ -609,7 +623,7 @@ segmentItems:
609623
- {key: db.statement, value: not null}
610624
- operationName: Elasticsearch/DeleteRequest
611625
parentSpanId: 0
612-
spanId: 27
626+
spanId: 28
613627
spanLayer: Database
614628
startTime: not null
615629
endTime: not null
@@ -627,7 +641,7 @@ segmentItems:
627641
- {key: db.statement, value: not null}
628642
- operationName: Elasticsearch/DeleteIndexRequest
629643
parentSpanId: 0
630-
spanId: 28
644+
spanId: 29
631645
spanLayer: Database
632646
startTime: not null
633647
endTime: not null

test/plugin/scenarios/elasticsearch-7.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/elasticsearch/RestHighLevelClientCase.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ public String elasticsearch() throws Exception {
109109

110110
// refresh
111111
client.indices().refresh(new RefreshRequest(indexName), RequestOptions.DEFAULT);
112+
client.indices().refresh(new RefreshRequest(indexName2), RequestOptions.DEFAULT);
112113

113114
// get
114115
get(indexName);

0 commit comments

Comments
 (0)