Skip to content

Commit 7bf703b

Browse files
Fixed unit test for pipeline stats
Signed-off-by: Martin Gaievski <gaievski@amazon.com>
1 parent ffeb095 commit 7bf703b

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

server/src/test/java/org/opensearch/search/pipeline/SearchPipelineStatsTests.java

+28-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private static SearchPipelineStats createStats() {
6060
new SearchPipelineStats.ProcessorStats("req1:a", "req1", new OperationStats(33, 34, 35, 36)),
6161
new SearchPipelineStats.ProcessorStats("req2", "req2", new OperationStats(37, 38, 39, 40))
6262
),
63-
List.of(new SearchPipelineStats.ProcessorStats("pha1:a", "pha1", new OperationStats(25, 26, 27, 28))),
63+
List.of(new SearchPipelineStats.ProcessorStats("pha1:a", "pha1", new OperationStats(33, 34, 35, 36))),
6464
List.of()
6565
)
6666
)
@@ -126,6 +126,19 @@ public void testToXContent() throws IOException {
126126
+ " }"
127127
+ " }"
128128
+ " }"
129+
+ " ],"
130+
+ " \"phase_results_processors\" : ["
131+
+ " {"
132+
+ " \"pha1:a\" : {"
133+
+ " \"type\" : \"pha1\","
134+
+ " \"stats\" : {"
135+
+ " \"count\" : 25,"
136+
+ " \"time_in_millis\" : 26,"
137+
+ " \"current\" : 27,"
138+
+ " \"failed\" : 28"
139+
+ " }"
140+
+ " }"
141+
+ " }"
129142
+ " ]"
130143
+ " },"
131144
+ " \"p2\" : {"
@@ -165,7 +178,20 @@ public void testToXContent() throws IOException {
165178
+ " }"
166179
+ " }"
167180
+ " ],"
168-
+ " \"response_processors\" : [ ]"
181+
+ " \"response_processors\" : [ ],"
182+
+ " \"phase_results_processors\" : ["
183+
+ " {"
184+
+ " \"pha1:a\" : {"
185+
+ " \"type\" : \"pha1\","
186+
+ " \"stats\" : {"
187+
+ " \"count\" : 33,"
188+
+ " \"time_in_millis\" : 34,"
189+
+ " \"current\" : 35,"
190+
+ " \"failed\" : 36"
191+
+ " }"
192+
+ " }"
193+
+ " }"
194+
+ " ]"
169195
+ " }"
170196
+ " }"
171197
+ " }"

0 commit comments

Comments
 (0)