upgrade and cleanup

This commit is contained in:
DOHA 2016-12-11 15:35:52 +02:00
parent 7ae02ac089
commit 2dc0cf6c36
3 changed files with 18 additions and 36 deletions

View File

@ -54,7 +54,7 @@
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.2</version>
<version>${commons-fileupload.version}</version>
</dependency>
<!-- web -->
@ -85,7 +85,7 @@
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.8</version>
<version>${xstream.version}</version>
</dependency>
<!-- util -->
@ -99,7 +99,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.5</version>
<version>${commons-lang3.version}</version>
</dependency>
<!-- logging -->
@ -171,18 +171,18 @@
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.1.0</version>
<version>${protobuf-java.version}</version>
</dependency>
<dependency>
<groupId>com.googlecode.protobuf-java-format</groupId>
<artifactId>protobuf-java-format</artifactId>
<version>1.4</version>
<version>${protobuf-java-format.version}</version>
</dependency>
<dependency>
<groupId>com.esotericsoftware</groupId>
<artifactId>kryo</artifactId>
<version>4.0.0</version>
<version>${kryo.version}</version>
</dependency>
</dependencies>
@ -337,38 +337,20 @@
</profiles>
<properties>
<!-- Spring -->
<!-- persistence -->
<hibernate.version>4.3.11.Final</hibernate.version>
<mysql-connector-java.version>5.1.40</mysql-connector-java.version>
<!-- various -->
<hibernate-validator.version>5.2.2.Final</hibernate-validator.version>
<commons-fileupload.version>1.3.2</commons-fileupload.version>
<kryo.version>4.0.0</kryo.version>
<protobuf-java-format.version>1.4</protobuf-java-format.version>
<protobuf-java.version>3.1.0</protobuf-java.version>
<commons-lang3.version>3.5</commons-lang3.version>
<xstream.version>1.4.9</xstream.version>
<!-- util -->
<guava.version>20.0</guava.version>
<commons-lang3.version>3.4</commons-lang3.version>
<!-- testing -->
<org.hamcrest.version>1.3</org.hamcrest.version>
<junit.version>4.12</junit.version>
<mockito.version>1.10.19</mockito.version>
<httpcore.version>4.4.1</httpcore.version>
<httpclient.version>4.5</httpclient.version>
<rest-assured.version>2.9.0</rest-assured.version>
<!-- logging -->
<org.slf4j.version>1.7.13</org.slf4j.version>
<logback.version>1.1.3</logback.version>
<!-- Maven plugins -->
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
<maven-war-plugin.version>2.6</maven-war-plugin.version>
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
<cargo-maven2-plugin.version>1.6.0</cargo-maven2-plugin.version>
<findbugs-maven-plugin.version>3.0.4</findbugs-maven-plugin.version>
<!-- okhttp -->
<com.squareup.okhttp3.version>3.4.1</com.squareup.okhttp3.version>
@ -380,7 +362,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.4</version>
<version>${findbugs-maven-plugin.version}</version>
<configuration>
<effort>Max</effort>
<omitVisitors>FindDeadLocalStores,FindNullDeref</omitVisitors>

View File

@ -4,6 +4,7 @@ import static org.baeldung.client.Consts.APPLICATION_PORT;
import java.io.File;
import java.io.IOException;
import java.net.SocketTimeoutException;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
@ -32,7 +33,7 @@ public class OkHttpMiscLiveTest {
client = new OkHttpClient();
}
@Test
@Test(expected = SocketTimeoutException.class)
public void whenSetRequestTimeout_thenFail() throws IOException {
final OkHttpClient clientWithTimeout = new OkHttpClient.Builder().readTimeout(1, TimeUnit.SECONDS).build();

View File

@ -1,7 +1,6 @@
package org.baeldung.web.controller.redirect;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.flash;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.forwardedUrl;
@ -51,7 +50,7 @@ public class RedirectControllerIntegrationTest {
@Test
public void whenRedirectOnUrlWithUsingRedirectAttributes_thenStatusRedirectionAndRedirectedOnUrlAndAddedAttributeToFlashScope() throws Exception {
mockMvc.perform(get("/redirectWithRedirectAttributes")).andExpect(status().is3xxRedirection()).andExpect(flash().attribute("flashAttribute", equalTo("redirectWithRedirectAttributes")))
.andExpect(model().attribute("attribute", equalTo("redirectWithRedirectAttributes"))).andExpect(model().attribute("flashAttribute", equalTo(nullValue()))).andExpect(redirectedUrl("redirectedUrl?attribute=redirectWithRedirectAttributes"));
.andExpect(model().attribute("attribute", equalTo("redirectWithRedirectAttributes"))).andExpect(model().attribute("flashAttribute", equalTo(null))).andExpect(redirectedUrl("redirectedUrl?attribute=redirectWithRedirectAttributes"));
}
@Test