diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf16034..5470762 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ on: env: GH_USER_NAME: github.actor SCRIPTS_VERSION: 5.12.0 - RELEASE_VERSION: 5.12.3 + RELEASE_VERSION: 5.13.0 jobs: release: diff --git a/gradle.properties b/gradle.properties index 20320c5..ff22f12 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=5.12.3 +version=5.13.0 org.gradle.parallel=true org.gradle.caching=true diff --git a/src/main/java/com/epam/ta/reportportal/ws/reporting/databind/OffsetDateTimeInstantSerializer.java b/src/main/java/com/epam/ta/reportportal/ws/reporting/databind/OffsetDateTimeInstantSerializer.java deleted file mode 100644 index 02d13d7..0000000 --- a/src/main/java/com/epam/ta/reportportal/ws/reporting/databind/OffsetDateTimeInstantSerializer.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.epam.ta.reportportal.ws.reporting.databind; - -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; -import java.io.IOException; -import java.time.Instant; -import java.time.ZoneOffset; -import java.time.format.DateTimeFormatter; - -public class OffsetDateTimeInstantSerializer extends JsonSerializer { - - private static final DateTimeFormatter formatter = DateTimeFormatter - .ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSSSSZ") - .withZone(ZoneOffset.UTC); - - @Override - public void serialize(Instant value, JsonGenerator gen, SerializerProvider provider) - throws IOException { - gen.writeString(formatter.format(value)); - } -} diff --git a/src/test/java/com/epam/ta/reportportal/ws/reporting/serializers/OffsetDateTimeInstantSerializerTest.java b/src/test/java/com/epam/ta/reportportal/ws/reporting/serializers/OffsetDateTimeInstantSerializerTest.java deleted file mode 100644 index a927f70..0000000 --- a/src/test/java/com/epam/ta/reportportal/ws/reporting/serializers/OffsetDateTimeInstantSerializerTest.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.epam.ta.reportportal.ws.reporting.serializers; - -import com.epam.ta.reportportal.ws.reporting.LaunchResource; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import java.io.IOException; -import java.time.Instant; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class OffsetDateTimeInstantSerializerTest { - - private static final String EXPECTED_PARSED_TIME = "2024-11-01T08:39:14.125000+0000"; - - @Test - @Disabled - void serializeTimeInCompatibleFormat() throws IOException { - LaunchResource launchResource = new LaunchResource(); - launchResource.setStartTime(Instant.ofEpochMilli(1730450354125L)); - ObjectMapper objectMapper = new ObjectMapper() - .configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false) - .registerModule(new JavaTimeModule()); - String s = objectMapper.writeValueAsString(launchResource); - Assertions.assertTrue(s.contains(EXPECTED_PARSED_TIME)); - } - -}