From e075132c5b3089e01540687a594bcbce3078e066 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Thu, 4 Apr 2024 15:01:06 +0300 Subject: [PATCH] Client version update --- CHANGELOG.md | 2 ++ build.gradle | 2 +- .../java/com/epam/reportportal/cucumber/AbstractReporter.java | 3 ++- .../integration/callback/scenario/CallbackReportingSteps.java | 1 + .../integration/callback/step/CallbackReportingSteps.java | 1 + 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92af1dc..d3e2313 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## [Unreleased] +### Changed +- Client version updated on [5.2.13](https://github.com/reportportal/client-java/releases/tag/5.2.13), by @HardNorth ## [5.2.2] ### Changed diff --git a/build.gradle b/build.gradle index 34eb2db..5b5895a 100644 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,7 @@ repositories { } dependencies { - api 'com.epam.reportportal:client-java:5.2.11' + api 'com.epam.reportportal:client-java:5.2.13' api 'info.cukes:gherkin:2.12.2' implementation 'org.slf4j:slf4j-api:2.0.7' diff --git a/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java b/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java index c7e9d96..bd0fc8b 100644 --- a/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java +++ b/src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java @@ -26,6 +26,7 @@ import com.epam.reportportal.service.tree.TestItemTree; import com.epam.reportportal.utils.*; import com.epam.reportportal.utils.files.ByteSource; +import com.epam.reportportal.utils.http.ContentType; import com.epam.reportportal.utils.properties.SystemAttributesExtractor; import com.epam.ta.reportportal.ws.model.FinishExecutionRQ; import com.epam.ta.reportportal.ws.model.FinishTestItemRQ; @@ -569,7 +570,7 @@ private static String getDataType(@Nonnull byte[] data) { */ @Override public void embedding(String mimeType, byte[] data) { - String type = ofNullable(mimeType).filter(m -> m.contains("/")).orElseGet(() -> getDataType(data)); + String type = ofNullable(mimeType).filter(ContentType::isValidType).orElseGet(() -> getDataType(data)); String attachmentName = ofNullable(type).map(t -> t.substring(0, t.indexOf("/"))).orElse(""); ReportPortal.emitLog(new ReportPortalMessage(ByteSource.wrap(data), type, attachmentName), "UNKNOWN", diff --git a/src/test/java/com/epam/reportportal/cucumber/integration/callback/scenario/CallbackReportingSteps.java b/src/test/java/com/epam/reportportal/cucumber/integration/callback/scenario/CallbackReportingSteps.java index 5e8d3b8..ae81221 100644 --- a/src/test/java/com/epam/reportportal/cucumber/integration/callback/scenario/CallbackReportingSteps.java +++ b/src/test/java/com/epam/reportportal/cucumber/integration/callback/scenario/CallbackReportingSteps.java @@ -64,6 +64,7 @@ private void sendFinishRequest(TestItemTree.TestItemLeaf testResultLeaf, String finishTestItemRQ.setDescription(description); finishTestItemRQ.setStatus(status); finishTestItemRQ.setEndTime(Calendar.getInstance().getTime()); + //noinspection ResultOfMethodCallIgnored ItemTreeReporter.finishItem(AbstractReporter.getReportPortal().getClient(), finishTestItemRQ, AbstractReporter.ITEM_TREE.getLaunchId(), diff --git a/src/test/java/com/epam/reportportal/cucumber/integration/callback/step/CallbackReportingSteps.java b/src/test/java/com/epam/reportportal/cucumber/integration/callback/step/CallbackReportingSteps.java index c9484bb..0ada073 100644 --- a/src/test/java/com/epam/reportportal/cucumber/integration/callback/step/CallbackReportingSteps.java +++ b/src/test/java/com/epam/reportportal/cucumber/integration/callback/step/CallbackReportingSteps.java @@ -65,6 +65,7 @@ private void sendFinishRequest(TestItemTree.TestItemLeaf testResultLeaf, String finishTestItemRQ.setDescription(description); finishTestItemRQ.setStatus(status); finishTestItemRQ.setEndTime(Calendar.getInstance().getTime()); + //noinspection ResultOfMethodCallIgnored ItemTreeReporter.finishItem(AbstractReporter.getReportPortal().getClient(), finishTestItemRQ, AbstractReporter.ITEM_TREE.getLaunchId(),