From 90c7dba34f08921b0b3b528c6a9fc20bf298a288 Mon Sep 17 00:00:00 2001 From: exceptionfactory Date: Fri, 8 Mar 2024 20:37:12 -0600 Subject: [PATCH] NIFI-12871 Upgraded Commons Compress from 1.25.0 to 1.26.1 - Adjusted Excel Record Reader test failure to use OpenXML Exception instead of message matching Signed-off-by: Pierre Villard This closes #8488. --- .../java/org/apache/nifi/excel/TestExcelRecordReader.java | 4 +++- pom.xml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-services/src/test/java/org/apache/nifi/excel/TestExcelRecordReader.java b/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-services/src/test/java/org/apache/nifi/excel/TestExcelRecordReader.java index b83bb52968..6fde3d07f1 100644 --- a/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-services/src/test/java/org/apache/nifi/excel/TestExcelRecordReader.java +++ b/nifi-nar-bundles/nifi-poi-bundle/nifi-poi-services/src/test/java/org/apache/nifi/excel/TestExcelRecordReader.java @@ -25,6 +25,7 @@ import org.apache.nifi.serialization.record.Record; import org.apache.nifi.serialization.record.RecordField; import org.apache.nifi.serialization.record.RecordFieldType; import org.apache.nifi.serialization.record.RecordSchema; +import org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; @@ -59,7 +60,8 @@ public class TestExcelRecordReader { .build(); MalformedRecordException mre = assertThrows(MalformedRecordException.class, () -> new ExcelRecordReader(configuration, getInputStream("notExcel.txt"), logger)); - assertTrue(ExceptionUtils.getStackTrace(mre).contains("this is not a valid OOXML")); + final Throwable cause = mre.getCause(); + assertInstanceOf(OpenXML4JRuntimeException.class, cause); } @Test diff --git a/pom.xml b/pom.xml index 711916f202..1fadf4fcad 100644 --- a/pom.xml +++ b/pom.xml @@ -117,7 +117,7 @@ 3.8.0 1.6.0 1.16.1 - 1.25.0 + 1.26.1 3.14.0 3.10.0 2.15.1