Skip to content

Commit

Permalink
Merge pull request #102 from reportportal/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
HardNorth authored Apr 4, 2024
2 parents b20a41c + e075132 commit 02d3fb3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 02d3fb3

Please sign in to comment.