From ae81c93dfaac9b69747eab53e8a123a0b6c87e32 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Tue, 26 Oct 2021 13:52:10 +0200 Subject: [PATCH] [Test][Transform] fix UpdateTransformActionRequestTests failure (#79787) (#79796) fix corner case when description gets too long fixes #79783 --- .../transform/action/UpdateTransformActionRequestTests.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/action/UpdateTransformActionRequestTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/action/UpdateTransformActionRequestTests.java index 7cd37b9c3144f..d6fff0a128c4a 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/action/UpdateTransformActionRequestTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/transform/action/UpdateTransformActionRequestTests.java @@ -57,6 +57,10 @@ protected Request mutateInstance(Request instance) throws IOException { case 1: String description = update.getDescription() == null ? "" : update.getDescription(); description += randomAlphaOfLengthBetween(1, 5); + // fix corner case that description gets too long + if (description.length() > 1000) { + description = description.substring(description.length() - 1000, description.length()); + } update = new TransformConfigUpdate( update.getSource(), update.getDestination(),