SQL: Fix long lines in tests (elastic/x-pack-elasticsearch#3450)
We had three tests with lines > 140 characters. This reflows those lines. Original commit: elastic/x-pack-elasticsearch@71b2e5fa08
This commit is contained in:
parent
27ee786cb6
commit
e45ec84a03
|
@ -44,9 +44,6 @@
|
||||||
<suppress files="sql[/\\]server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]sql[/\\]querydsl[/\\]agg[/\\]GroupingAgg.java" checks="LineLength" />
|
<suppress files="sql[/\\]server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]sql[/\\]querydsl[/\\]agg[/\\]GroupingAgg.java" checks="LineLength" />
|
||||||
<suppress files="sql[/\\]server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]sql[/\\]querydsl[/\\]query[/\\]RangeQuery.java" checks="LineLength" />
|
<suppress files="sql[/\\]server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]sql[/\\]querydsl[/\\]query[/\\]RangeQuery.java" checks="LineLength" />
|
||||||
<suppress files="sql[/\\]server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]sql[/\\]tree[/\\]NodeUtils.java" checks="LineLength" />
|
<suppress files="sql[/\\]server[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]sql[/\\]tree[/\\]NodeUtils.java" checks="LineLength" />
|
||||||
<suppress files="sql[/\\]server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]sql[/\\]execution[/\\]search[/\\]CursorTests.java" checks="LineLength" />
|
|
||||||
<suppress files="sql[/\\]server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]sql[/\\]execution[/\\]search[/\\]extractor[/\\]ProcessingHitExtractorTests.java" checks="LineLength" />
|
|
||||||
<suppress files="sql[/\\]server[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]sql[/\\]expression[/\\]function[/\\]scalar[/\\]datetime[/\\]DateTimeProcessorTests.java" checks="LineLength" />
|
|
||||||
|
|
||||||
<suppress files="plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]common[/\\]action[/\\]XPackDeleteByQueryAction.java" checks="LineLength" />
|
<suppress files="plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]common[/\\]action[/\\]XPackDeleteByQueryAction.java" checks="LineLength" />
|
||||||
<suppress files="plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]ml[/\\]action[/\\]StopDatafeedAction.java" checks="LineLength" />
|
<suppress files="plugin[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]xpack[/\\]ml[/\\]action[/\\]StopDatafeedAction.java" checks="LineLength" />
|
||||||
|
|
|
@ -64,7 +64,8 @@ public class CursorTests extends ESTestCase {
|
||||||
if (randomBoolean()) {
|
if (randomBoolean()) {
|
||||||
columns = new ArrayList<>(columnCount);
|
columns = new ArrayList<>(columnCount);
|
||||||
for (int i = 0; i < columnCount; i++) {
|
for (int i = 0; i < columnCount; i++) {
|
||||||
columns.add(new SqlResponse.ColumnInfo(randomAlphaOfLength(10), randomAlphaOfLength(10), randomFrom(JDBCType.values()), randomInt(25)));
|
columns.add(new SqlResponse.ColumnInfo(randomAlphaOfLength(10), randomAlphaOfLength(10),
|
||||||
|
randomFrom(JDBCType.values()), randomInt(25)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new SqlResponse("", columns, Collections.emptyList());
|
return new SqlResponse("", columns, Collections.emptyList());
|
||||||
|
|
|
@ -69,7 +69,9 @@ public class ProcessingHitExtractorTests extends AbstractWireSerializingTestCase
|
||||||
|
|
||||||
public void testGet() {
|
public void testGet() {
|
||||||
String fieldName = randomAlphaOfLength(5);
|
String fieldName = randomAlphaOfLength(5);
|
||||||
ChainingProcessor extractor = new ChainingProcessor(new HitExtractorProcessor(new FieldHitExtractor(fieldName, true)), new MathProcessor(MathOperation.LOG));
|
ChainingProcessor extractor = new ChainingProcessor(
|
||||||
|
new HitExtractorProcessor(new FieldHitExtractor(fieldName, true)),
|
||||||
|
new MathProcessor(MathOperation.LOG));
|
||||||
|
|
||||||
int times = between(1, 1000);
|
int times = between(1, 1000);
|
||||||
for (int i = 0; i < times; i++) {
|
for (int i = 0; i < times; i++) {
|
||||||
|
|
|
@ -30,7 +30,8 @@ public class DateTimeProcessorTests extends AbstractWireSerializingTestCase<Date
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected DateTimeProcessor mutateInstance(DateTimeProcessor instance) throws IOException {
|
protected DateTimeProcessor mutateInstance(DateTimeProcessor instance) throws IOException {
|
||||||
return new DateTimeProcessor(randomValueOtherThan(instance.extractor(), () -> randomFrom(DateTimeExtractor.values())), DateTimeZone.UTC);
|
DateTimeExtractor replaced = randomValueOtherThan(instance.extractor(), () -> randomFrom(DateTimeExtractor.values()));
|
||||||
|
return new DateTimeProcessor(replaced, DateTimeZone.UTC);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testApply() {
|
public void testApply() {
|
||||||
|
|
Loading…
Reference in New Issue