Skip to content

Commit

Permalink
Dependencies update
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Apr 4, 2024
1 parent 47edf03 commit df25f7b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

## [Unreleased]
### Changed
- Client version updated on [5.2.13](https://github.com/reportportal/client-java/releases/tag/5.2.13), by @HardNorth
### Removed
- `OkHttp` dependency, by @HardNorth

## [5.2.1]
### Changed
Expand Down
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,14 @@ repositories {
}

dependencies {
api 'com.epam.reportportal:client-java:5.2.4'
api 'com.google.code.findbugs:jsr305:3.0.2'
api 'com.epam.reportportal:client-java:5.2.13'
api "io.cucumber:cucumber-java:${project.cucumber_version}"

implementation 'com.squareup.okhttp3:okhttp:4.12.0'
implementation 'org.slf4j:slf4j-api:2.0.7'

testImplementation 'com.epam.reportportal:agent-java-test-utils:0.0.2'
testImplementation 'com.epam.reportportal:agent-java-test-utils:0.0.6'

testImplementation 'com.squareup.okhttp3:okhttp:4.12.0'
testImplementation 'org.aspectj:aspectjweaver:1.9.19'
testImplementation "io.cucumber:cucumber-testng:${project.cucumber_version}"
testImplementation 'org.hamcrest:hamcrest-core:2.2'
Expand Down
12 changes: 2 additions & 10 deletions src/main/java/com/epam/reportportal/cucumber/AbstractReporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,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.markdown.MarkdownUtils;
import com.epam.reportportal.utils.properties.SystemAttributesExtractor;
import com.epam.ta.reportportal.ws.model.FinishExecutionRQ;
Expand All @@ -46,7 +47,6 @@
import gherkin.ast.Tag;
import gherkin.pickles.*;
import io.reactivex.Maybe;
import okhttp3.MediaType;
import org.apache.commons.lang3.tuple.Pair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -535,15 +535,7 @@ private static String getDataType(@Nonnull byte[] data) {
* @param data data to attach
*/
protected void embedding(String mimeType, byte[] data) {
String type = ofNullable(mimeType).filter(m -> {
try {
MediaType.get(m);
return true;
} catch (IllegalArgumentException e) {
LOGGER.warn("Incorrect media type '{}'", m);
return false;
}
}).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 @@ -140,7 +140,7 @@ public void verify_text_embedding() {
List<String> types = getTypes(logCaptor, logs);

assertThat(types, hasSize(3));
assertThat(types, containsInAnyOrder("text/plain", "image/png", "application/octet-stream"));
assertThat(types, containsInAnyOrder("text/plain", "image/png", "text/plain"));
}

@Test
Expand Down

0 comments on commit df25f7b

Please sign in to comment.