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,11 +85,17 @@
|
|||||||
<version>${jquery.version}</version>
|
<version>${jquery.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-context</artifactId>
|
<artifactId>spring-cloud-context</artifactId>
|
||||||
<version>${springcloud.version}</version>
|
<version>${springcloud.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpclient</artifactId>
|
||||||
|
<version>${httpclient.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
@ -190,7 +196,8 @@
|
|||||||
<jpa.version>2.2</jpa.version>
|
<jpa.version>2.2</jpa.version>
|
||||||
<guava.version>18.0</guava.version>
|
<guava.version>18.0</guava.version>
|
||||||
<subethasmtp.version>3.1.7</subethasmtp.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>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -6,13 +6,13 @@ import org.springframework.stereotype.Component;
|
|||||||
@Component
|
@Component
|
||||||
public class ConfProperties {
|
public class ConfProperties {
|
||||||
|
|
||||||
@Value("${url}")
|
@Value("${db.url}")
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
@Value("${username}")
|
@Value("${db.username}")
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
@Value("${password}")
|
@Value("${db.password}")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
public String getUrl() {
|
public String getUrl() {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
url=jdbc:postgresql://localhost:5432/
|
db.url=jdbc:postgresql://localhost:5432/
|
||||||
username=admin
|
db.username=admin
|
||||||
password=root
|
db.password=root
|
||||||
spring.main.allow-bean-definition-overriding=true
|
spring.main.allow-bean-definition-overriding=true
|
@ -2,17 +2,16 @@ package com.baeldung.restart;
|
|||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
import org.junit.After;
|
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||||
import org.springframework.boot.web.client.RestTemplateBuilder;
|
|
||||||
import org.springframework.http.HttpMethod;
|
import org.springframework.http.HttpMethod;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
|
||||||
import java.time.Duration;
|
/**
|
||||||
|
* We have to make sure that while running this test, 8080 and 8090 ports are free.
|
||||||
public class RestartApplicationIntegrationTest {
|
* Otherwise it will fail.
|
||||||
|
*/
|
||||||
|
public class RestartApplicationManualTest {
|
||||||
|
|
||||||
private TestRestTemplate restTemplate = new TestRestTemplate();
|
private TestRestTemplate restTemplate = new TestRestTemplate();
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user