Browse Source

Docs tests: cat/health can have max_task_wait_time

Make the doc test assertions ok with a non `-` value for
`max_task_wait_time`. These are rare, but possible:
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+multijob-unix-compatibility/os=oraclelinux/900/consoleFull
Nik Everett 8 năm trước cách đây
mục cha
commit
94e3796908
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      docs/reference/cat/health.asciidoc

+ 3 - 2
docs/reference/cat/health.asciidoc

@@ -16,7 +16,8 @@ GET /_cat/health?v
 epoch      timestamp cluster       status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
 1475871424 16:17:04  elasticsearch green           1         1      5   5    0    0        0             0                  -                100.0%
 --------------------------------------------------
-// TESTRESPONSE[s/1475871424 16:17:04/\\d+ \\d+:\\d+:\\d+/ s/elasticsearch/[^ ]+/ s/0                  -/\\d+ -/ _cat]
+// TESTRESPONSE[s/1475871424 16:17:04/\\d+ \\d+:\\d+:\\d+/]
+// TESTRESPONSE[s/elasticsearch/[^ ]+/ s/0                  -/\\d+ (-|\\d+(\\.\\d+)?[ms]+)/ _cat]
 
 It has one option `ts` to disable the timestamping:
 
@@ -34,7 +35,7 @@ which looks like:
 cluster       status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
 elasticsearch green           1         1      5   5    0    0        0             0                  -                100.0%
 --------------------------------------------------
-// TESTRESPONSE[s/elasticsearch/[^ ]+/ s/0                  -/\\d+ -/ _cat]
+// TESTRESPONSE[s/elasticsearch/[^ ]+/ s/0                  -/\\d+ (-|\\d+(\\.\\d+)?[ms]+)/ _cat]
 
 A common use of this command is to verify the health is consistent
 across nodes: