NIFI-13595 Replaced test method random string with repeated string (#9124)

Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
dan-s1 2024-07-30 09:12:02 -04:00 committed by GitHub
parent 25299f8106
commit b0d402d146
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,7 +16,6 @@
*/
package org.apache.nifi.processors.elasticsearch;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.nifi.elasticsearch.IndexOperationRequest;
import org.apache.nifi.elasticsearch.IndexOperationResponse;
import org.apache.nifi.processor.exception.ProcessException;
@ -468,7 +467,7 @@ public class PutElasticsearchJsonTest extends AbstractPutElasticsearchTest {
runner.setProperty(ElasticsearchRestProcessor.MAX_JSON_FIELD_STRING_LENGTH, "1KB");
runner.assertValid();
final String val = String.format("{\"large\": \"%s\"}", RandomStringUtils.randomAlphanumeric(10000));
final String val = String.format("{\"large\": \"%s\"}", "a".repeat(10000));
runner.enqueue(val);
runner.run();