summaryrefslogtreecommitdiff
path: root/core/src/test/java/org/elasticsearch/search/profile
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/test/java/org/elasticsearch/search/profile')
-rw-r--r--core/src/test/java/org/elasticsearch/search/profile/ProfileResultTests.java6
-rw-r--r--core/src/test/java/org/elasticsearch/search/profile/SearchProfileShardResultsTests.java2
-rw-r--r--core/src/test/java/org/elasticsearch/search/profile/aggregation/AggregationProfilerIT.java4
-rw-r--r--core/src/test/java/org/elasticsearch/search/profile/query/CollectorResultTests.java4
4 files changed, 7 insertions, 9 deletions
diff --git a/core/src/test/java/org/elasticsearch/search/profile/ProfileResultTests.java b/core/src/test/java/org/elasticsearch/search/profile/ProfileResultTests.java
index fddbd6eaae..70375c6d20 100644
--- a/core/src/test/java/org/elasticsearch/search/profile/ProfileResultTests.java
+++ b/core/src/test/java/org/elasticsearch/search/profile/ProfileResultTests.java
@@ -41,8 +41,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertToXC
public class ProfileResultTests extends ESTestCase {
public static ProfileResult createTestItem(int depth) {
- String type = randomAsciiOfLengthBetween(5, 10);
- String description = randomAsciiOfLengthBetween(5, 10);
+ String type = randomAlphaOfLengthBetween(5, 10);
+ String description = randomAlphaOfLengthBetween(5, 10);
int timingsSize = randomIntBetween(0, 5);
Map<String, Long> timings = new HashMap<>(timingsSize);
for (int i = 0; i < timingsSize; i++) {
@@ -51,7 +51,7 @@ public class ProfileResultTests extends ESTestCase {
// also often use "small" values in tests
time = randomNonNegativeLong() % 10000;
}
- timings.put(randomAsciiOfLengthBetween(5, 10), time); // don't overflow Long.MAX_VALUE;
+ timings.put(randomAlphaOfLengthBetween(5, 10), time); // don't overflow Long.MAX_VALUE;
}
int childrenSize = depth > 0 ? randomIntBetween(0, 1) : 0;
List<ProfileResult> children = new ArrayList<>(childrenSize);
diff --git a/core/src/test/java/org/elasticsearch/search/profile/SearchProfileShardResultsTests.java b/core/src/test/java/org/elasticsearch/search/profile/SearchProfileShardResultsTests.java
index 2d9cf84786..82ed118f55 100644
--- a/core/src/test/java/org/elasticsearch/search/profile/SearchProfileShardResultsTests.java
+++ b/core/src/test/java/org/elasticsearch/search/profile/SearchProfileShardResultsTests.java
@@ -51,7 +51,7 @@ public class SearchProfileShardResultsTests extends ESTestCase {
queryProfileResults.add(QueryProfileShardResultTests.createTestItem());
}
AggregationProfileShardResult aggProfileShardResult = AggregationProfileShardResultTests.createTestItem(1);
- searchProfileResults.put(randomAsciiOfLengthBetween(5, 10), new ProfileShardResult(queryProfileResults, aggProfileShardResult));
+ searchProfileResults.put(randomAlphaOfLengthBetween(5, 10), new ProfileShardResult(queryProfileResults, aggProfileShardResult));
}
return new SearchProfileShardResults(searchProfileResults);
}
diff --git a/core/src/test/java/org/elasticsearch/search/profile/aggregation/AggregationProfilerIT.java b/core/src/test/java/org/elasticsearch/search/profile/aggregation/AggregationProfilerIT.java
index 342da16f50..b09c177bf0 100644
--- a/core/src/test/java/org/elasticsearch/search/profile/aggregation/AggregationProfilerIT.java
+++ b/core/src/test/java/org/elasticsearch/search/profile/aggregation/AggregationProfilerIT.java
@@ -28,8 +28,6 @@ import org.elasticsearch.search.aggregations.metrics.avg.AvgAggregator;
import org.elasticsearch.search.aggregations.metrics.max.MaxAggregator;
import org.elasticsearch.search.profile.ProfileResult;
import org.elasticsearch.search.profile.ProfileShardResult;
-import org.elasticsearch.search.profile.aggregation.AggregationProfileShardResult;
-import org.elasticsearch.search.profile.aggregation.AggregationTimingType;
import org.elasticsearch.test.ESIntegTestCase;
import java.util.ArrayList;
import java.util.List;
@@ -68,7 +66,7 @@ public class AggregationProfilerIT extends ESIntegTestCase {
String[] randomStrings = new String[randomIntBetween(2, 10)];
for (int i = 0; i < randomStrings.length; i++) {
- randomStrings[i] = randomAsciiOfLength(10);
+ randomStrings[i] = randomAlphaOfLength(10);
}
for (int i = 0; i < 5; i++) {
diff --git a/core/src/test/java/org/elasticsearch/search/profile/query/CollectorResultTests.java b/core/src/test/java/org/elasticsearch/search/profile/query/CollectorResultTests.java
index 43e1e32db3..698e4a387a 100644
--- a/core/src/test/java/org/elasticsearch/search/profile/query/CollectorResultTests.java
+++ b/core/src/test/java/org/elasticsearch/search/profile/query/CollectorResultTests.java
@@ -39,8 +39,8 @@ import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertToXC
public class CollectorResultTests extends ESTestCase {
public static CollectorResult createTestItem(int depth) {
- String name = randomAsciiOfLengthBetween(5, 10);
- String reason = randomAsciiOfLengthBetween(5, 10);
+ String name = randomAlphaOfLengthBetween(5, 10);
+ String reason = randomAlphaOfLengthBetween(5, 10);
long time = randomNonNegativeLong();
if (randomBoolean()) {
// also often use relatively "small" values, otherwise we will mostly test huge longs