Skip to content

Commit

Permalink
Merge branch 'develop' into EPMRPP-96317-fix-count
Browse files Browse the repository at this point in the history
  • Loading branch information
grabsefx authored Dec 12, 2024
2 parents fa29576 + 525904a commit 373c086
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,4 @@ drill {

tasks.preTagCommit.enabled = false
tasks.updateVersion.enabled = false
tasks.commitNewVersion.enabled = false
tasks.commitNewVersion.enabled = false
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright 2024 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.epam.ta.reportportal.core.configs;

import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
* @author <a href="mailto:[email protected]">Siarhei Hrabko</a>
*/
@Configuration
public class RestTemplateConfig {

@Bean
RestTemplate restTemplate() {
return new RestTemplateBuilder()
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ public class JobsHealthIndicator extends AbstractHealthIndicator {

private static Logger LOGGER = LoggerFactory.getLogger(JobsHealthIndicator.class);
private static final String ERROR_MESSAGE = "Jobs service health check failed";
RestTemplate restTemplate;
private final RestTemplate restTemplate;

@Value("${rp.jobs.baseUrl}")
private String jobsBaseUrl;

public JobsHealthIndicator() {
public JobsHealthIndicator(RestTemplate restTemplate) {
super(ERROR_MESSAGE);
this.restTemplate = new RestTemplate();
this.restTemplate = restTemplate;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public class JobsInfoContributor implements InfoContributor {
@Value("${rp.jobs.baseUrl}")
private String jobsBaseUrl;

public JobsInfoContributor() {
this.restTemplate = new RestTemplate();
public JobsInfoContributor(RestTemplate restTemplate) {
this.restTemplate = restTemplate;
}

@Override
Expand Down

0 comments on commit 373c086

Please sign in to comment.