Merge pull request #7695 from amit2103/BAEL-16767
[BAEL-16767] - Fix the integrations tests in spring-boot-ops
This commit is contained in:
commit
9fefbde74d
|
@ -85,12 +85,18 @@
|
|||
<version>${jquery.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-context</artifactId>
|
||||
<version>${springcloud.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>${httpclient.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -190,7 +196,8 @@
|
|||
<jpa.version>2.2</jpa.version>
|
||||
<guava.version>18.0</guava.version>
|
||||
<subethasmtp.version>3.1.7</subethasmtp.version>
|
||||
<springcloud.version>2.0.2.RELEASE</springcloud.version>
|
||||
<springcloud.version>2.0.2.RELEASE</springcloud.version>
|
||||
<httpclient.version>4.5.8</httpclient.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -6,13 +6,13 @@ import org.springframework.stereotype.Component;
|
|||
@Component
|
||||
public class ConfProperties {
|
||||
|
||||
@Value("${url}")
|
||||
@Value("${db.url}")
|
||||
private String url;
|
||||
|
||||
@Value("${username}")
|
||||
@Value("${db.username}")
|
||||
private String username;
|
||||
|
||||
@Value("${password}")
|
||||
@Value("${db.password}")
|
||||
private String password;
|
||||
|
||||
public String getUrl() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
url=jdbc:postgresql://localhost:5432/
|
||||
username=admin
|
||||
password=root
|
||||
db.url=jdbc:postgresql://localhost:5432/
|
||||
db.username=admin
|
||||
db.password=root
|
||||
spring.main.allow-bean-definition-overriding=true
|
|
@ -2,17 +2,16 @@ package com.baeldung.restart;
|
|||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||
import org.springframework.boot.web.client.RestTemplateBuilder;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
public class RestartApplicationIntegrationTest {
|
||||
/**
|
||||
* We have to make sure that while running this test, 8080 and 8090 ports are free.
|
||||
* Otherwise it will fail.
|
||||
*/
|
||||
public class RestartApplicationManualTest {
|
||||
|
||||
private TestRestTemplate restTemplate = new TestRestTemplate();
|
||||
|
Loading…
Reference in New Issue