|
7 | 7 |
|
8 | 8 | package org.elasticsearch.xpack.logsdb; |
9 | 9 |
|
10 | | -import org.apache.http.util.EntityUtils; |
11 | 10 | import org.elasticsearch.client.Request; |
12 | 11 | import org.elasticsearch.cluster.metadata.IndexMetadata; |
13 | 12 | import org.elasticsearch.common.settings.Settings; |
14 | 13 | import org.elasticsearch.common.time.DateFormatter; |
15 | 14 | import org.elasticsearch.common.time.FormatNames; |
16 | | -import org.elasticsearch.common.xcontent.XContentHelper; |
17 | 15 | import org.elasticsearch.common.xcontent.support.XContentMapValues; |
18 | 16 | import org.elasticsearch.index.IndexSettings; |
19 | 17 | import org.elasticsearch.test.cluster.ElasticsearchCluster; |
20 | 18 | import org.elasticsearch.test.cluster.local.distribution.DistributionType; |
21 | 19 | import org.elasticsearch.test.rest.ESRestTestCase; |
22 | | -import org.elasticsearch.xcontent.json.JsonXContent; |
23 | 20 | import org.hamcrest.Matchers; |
24 | 21 | import org.junit.ClassRule; |
25 | 22 |
|
@@ -380,14 +377,9 @@ public void testSyntheticSourceRuntimeFieldQueries() throws IOException { |
380 | 377 | String messageLength = Integer.toString(msg.length()); |
381 | 378 | sb.append("{ \"create\": {} }").append('\n'); |
382 | 379 | if (randomBoolean()) { |
383 | | - sb.append( |
384 | | - """ |
385 | | - {"@timestamp":"$now","message":"$msg","message_length":$l,"log":{"level":"$level"}} |
386 | | - """.replace("$now", formatInstant(now)) |
387 | | - .replace("$level", level) |
388 | | - .replace("$msg", msg) |
389 | | - .replace("$l", messageLength) |
390 | | - ); |
| 380 | + sb.append(""" |
| 381 | + {"@timestamp":"$now","message":"$msg","message_length":$l,"log":{"level":"$level"}} |
| 382 | + """.replace("$now", formatInstant(now)).replace("$level", level).replace("$msg", msg).replace("$l", messageLength)); |
391 | 383 | } else { |
392 | 384 | sb.append(""" |
393 | 385 | {"@timestamp": "$now", "message": "$msg", "message_length": $l} |
|
0 commit comments