Skip to content

Commit

Permalink
EPMRPP-90180 update dependencies (Instant time) (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
grabsefx authored Apr 15, 2024
1 parent abcf0cd commit fadf9fa
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 29 deletions.
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ dependencies {
implementation 'com.epam.reportportal:plugin-api'
annotationProcessor 'com.epam.reportportal:plugin-api'
} else {
implementation 'com.github.reportportal:commons-dao:fa04c1f'
implementation 'com.github.reportportal:plugin-api:20ab960'
annotationProcessor 'com.github.reportportal:plugin-api:20ab960'
implementation 'com.github.reportportal:commons-dao:0703b75'
implementation 'com.github.reportportal:plugin-api:3ecb915657'
annotationProcessor 'com.github.reportportal:plugin-api:3ecb915657'
}
implementation 'org.hibernate:hibernate-core:5.6.15.Final'

implementation group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1'
testImplementation 'org.junit.jupiter:junit-jupiter:5.6.0'
Expand Down Expand Up @@ -127,4 +128,4 @@ task assemblePlugins(type: Copy) {
dependsOn subprojects.assemblePlugin
}

compileJava.dependsOn npm_run_build
compileJava.dependsOn npm_run_build
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.epam.reportportal.extension.gitlab.command;

import static com.epam.ta.reportportal.commons.EntityUtils.TO_DATE;
import static com.epam.ta.reportportal.commons.EntityUtils.INSTANT_TO_LDT;
import static java.util.Optional.ofNullable;

import com.epam.reportportal.extension.gitlab.client.GitlabClient;
Expand Down Expand Up @@ -159,7 +159,7 @@ private String getFormattedMessage(Log log) {
StringBuilder messageBuilder = new StringBuilder();
messageBuilder.append(CODE);
ofNullable(log.getLogTime()).ifPresent(logTime -> messageBuilder.append(" Time: ")
.append(dateFormat.format(TO_DATE.apply(logTime))).append(", "));
.append(dateFormat.format(INSTANT_TO_LDT.apply(logTime))).append(", "));
ofNullable(log.getLogLevel()).ifPresent(
logLevel -> messageBuilder.append("Level: ").append(logLevel).append(", "));
messageBuilder.append("Log: ").append(log.getLogMessage()).append(CODE).append("\n\n");
Expand All @@ -180,4 +180,4 @@ private void addAttachment(StringBuilder descriptionBuilder, Attachment attachme
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,26 @@

package com.epam.reportportal.extension.gitlab.command;

import static org.hibernate.bytecode.BytecodeLogger.LOGGER;

import com.epam.reportportal.extension.CommonPluginCommand;
import com.epam.reportportal.extension.gitlab.client.GitlabClientProvider;
import com.epam.reportportal.extension.gitlab.utils.TicketMapper;
import com.epam.reportportal.model.externalsystem.Ticket;
import com.epam.reportportal.rules.exception.ErrorType;
import com.epam.reportportal.rules.exception.ReportPortalException;
import com.epam.ta.reportportal.dao.IntegrationRepository;
import com.epam.ta.reportportal.entity.integration.Integration;
import com.epam.reportportal.rules.exception.ReportPortalException;
import com.epam.reportportal.rules.exception.ErrorType;
import java.util.Map;
import java.util.Optional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author <a href="mailto:[email protected]">Andrei Piankouski</a>
*/
public class GetIssueCommand implements CommonPluginCommand<Ticket> {
private static final Logger LOGGER = LoggerFactory.getLogger(GetIssueCommand.class);


private final String PROJECT_ID = "projectId";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,25 @@
package com.epam.reportportal.extension.gitlab.command;

import static java.util.Optional.ofNullable;
import static org.hibernate.bytecode.BytecodeLogger.LOGGER;

import com.epam.reportportal.extension.PluginCommand;
import com.epam.reportportal.extension.gitlab.client.GitlabClient;
import com.epam.reportportal.extension.gitlab.client.GitlabClientProvider;
import com.epam.reportportal.extension.gitlab.dto.IssueDto;
import com.epam.reportportal.rules.exception.ErrorType;
import com.epam.reportportal.rules.exception.ReportPortalException;
import com.epam.ta.reportportal.entity.integration.Integration;
import com.epam.ta.reportportal.entity.integration.IntegrationParams;
import com.epam.reportportal.rules.exception.ReportPortalException;
import com.epam.reportportal.rules.exception.ErrorType;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author Zsolt Nagyaghy
*/
public class GetIssuesCommand implements PluginCommand<List<IssueDto>> {
private static final Logger LOGGER = LoggerFactory.getLogger(GetIssuesCommand.class);

private final GitlabClientProvider gitlabClientProvider;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,24 @@
package com.epam.reportportal.extension.gitlab.command;

import static java.util.Optional.ofNullable;
import static org.hibernate.bytecode.BytecodeLogger.LOGGER;

import com.epam.reportportal.extension.PluginCommand;
import com.epam.reportportal.extension.gitlab.client.GitlabClientProvider;
import com.epam.reportportal.extension.gitlab.dto.EpicDto;
import com.epam.reportportal.rules.exception.ErrorType;
import com.epam.reportportal.rules.exception.ReportPortalException;
import com.epam.ta.reportportal.entity.integration.Integration;
import com.epam.ta.reportportal.entity.integration.IntegrationParams;
import com.epam.reportportal.rules.exception.ReportPortalException;
import com.epam.reportportal.rules.exception.ErrorType;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author <a href="mailto:[email protected]">Pavel Bortnik</a>
*/
public class SearchEpicsCommand implements PluginCommand<List<EpicDto>> {
private static final Logger LOGGER = LoggerFactory.getLogger(SearchEpicsCommand.class);

private final GitlabClientProvider gitlabClientProvider;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,24 @@
package com.epam.reportportal.extension.gitlab.command;

import static java.util.Optional.ofNullable;
import static org.hibernate.bytecode.BytecodeLogger.LOGGER;

import com.epam.reportportal.extension.PluginCommand;
import com.epam.reportportal.extension.gitlab.client.GitlabClientProvider;
import com.epam.reportportal.extension.gitlab.dto.LabelDto;
import com.epam.reportportal.rules.exception.ErrorType;
import com.epam.reportportal.rules.exception.ReportPortalException;
import com.epam.ta.reportportal.entity.integration.Integration;
import com.epam.ta.reportportal.entity.integration.IntegrationParams;
import com.epam.reportportal.rules.exception.ReportPortalException;
import com.epam.reportportal.rules.exception.ErrorType;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author <a href="mailto:[email protected]">Pavel Bortnik</a>
*/
public class SearchLabelsCommand implements PluginCommand<List<LabelDto>> {

private static final Logger LOGGER = LoggerFactory.getLogger(SearchLabelsCommand.class);
private final GitlabClientProvider gitlabClientProvider;

public SearchLabelsCommand(GitlabClientProvider gitlabClientProvider) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,24 @@
package com.epam.reportportal.extension.gitlab.command;

import static java.util.Optional.ofNullable;
import static org.hibernate.bytecode.BytecodeLogger.LOGGER;

import com.epam.reportportal.extension.PluginCommand;
import com.epam.reportportal.extension.gitlab.client.GitlabClientProvider;
import com.epam.reportportal.extension.gitlab.dto.MilestoneDto;
import com.epam.reportportal.rules.exception.ErrorType;
import com.epam.reportportal.rules.exception.ReportPortalException;
import com.epam.ta.reportportal.entity.integration.Integration;
import com.epam.ta.reportportal.entity.integration.IntegrationParams;
import com.epam.reportportal.rules.exception.ReportPortalException;
import com.epam.reportportal.rules.exception.ErrorType;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author <a href="mailto:[email protected]">Pavel Bortnik</a>
*/
public class SearchMilestonesCommand implements PluginCommand<List<MilestoneDto>> {
private static final Logger LOGGER = LoggerFactory.getLogger(SearchMilestonesCommand.class);

private final GitlabClientProvider gitlabClientProvider;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,25 @@
package com.epam.reportportal.extension.gitlab.command;

import static java.util.Optional.ofNullable;
import static org.hibernate.bytecode.BytecodeLogger.LOGGER;

import com.epam.reportportal.extension.PluginCommand;
import com.epam.reportportal.extension.gitlab.client.GitlabClientProvider;
import com.epam.reportportal.extension.gitlab.dto.UserDto;
import com.epam.reportportal.rules.exception.ErrorType;
import com.epam.reportportal.rules.exception.ReportPortalException;
import com.epam.ta.reportportal.entity.integration.Integration;
import com.epam.ta.reportportal.entity.integration.IntegrationParams;
import com.epam.reportportal.rules.exception.ReportPortalException;
import com.epam.reportportal.rules.exception.ErrorType;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author <a href="mailto:[email protected]">Pavel Bortnik</a>
*/
public class SearchUsersCommand implements PluginCommand<List<UserDto>> {

private static final Logger LOGGER = LoggerFactory.getLogger(SearchUsersCommand.class);
private final GitlabClientProvider gitlabClientProvider;

public SearchUsersCommand(GitlabClientProvider gitlabClientProvider) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
import com.epam.ta.reportportal.entity.integration.Integration;
import com.epam.ta.reportportal.entity.integration.IntegrationParams;
import com.epam.ta.reportportal.entity.integration.IntegrationType;

import java.time.LocalDateTime;
import java.time.Instant;
import java.util.HashMap;
import java.util.List;

Expand Down Expand Up @@ -58,7 +57,7 @@ private void createIntegration(String name, IntegrationType integrationType) {
Integration integration = new Integration();
integration.setName(name);
integration.setType(integrationType);
integration.setCreationDate(LocalDateTime.now());
integration.setCreationDate(Instant.now());
integration.setEnabled(true);
integration.setCreator("SYSTEM");
integration.setParams(new IntegrationParams(new HashMap<>()));
Expand Down

0 comments on commit fadf9fa

Please sign in to comment.