Merge remote-tracking branch 'origin/master'

This commit is contained in:
slavisa-baeldung 2017-04-01 08:26:15 +01:00
commit 44865cd630
13 changed files with 68 additions and 40 deletions

View File

@ -1 +1,3 @@
*.docx
temp.xls
temp.xlsx

View File

@ -33,6 +33,7 @@
<groupId>org.apache.hbase</groupId>
<artifactId>hbase</artifactId>
<version>${hbase.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>junit</groupId>

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung</groupId>
<artifactId>jee7schedule</artifactId>
<artifactId>jee7</artifactId>
<version>1.0-SNAPSHOT</version>
<description>JavaEE 7 Arquillian Archetype Sample</description>
<packaging>war</packaging>

View File

@ -19,23 +19,25 @@ import static com.jayway.awaitility.Awaitility.to;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
@RunWith(Arquillian.class)
public class ScheduleTimerBeanIntegrationTest {
final static long TIMEOUT = 5000l;
final static long TOLERANCE = 1000l;
private final static long TIMEOUT = 5000l;
private final static long TOLERANCE = 1000l;
@Inject
TimerEventListener timerEventListener;
@Inject TimerEventListener timerEventListener;
@Deployment
public static WebArchive deploy() {
File[] jars = Maven.resolver().loadPomFromFile("pom.xml")
File[] jars = Maven
.resolver()
.loadPomFromFile("pom.xml")
.resolve("com.jayway.awaitility:awaitility")
.withTransitivity().asFile();
.withTransitivity()
.asFile();
return ShrinkWrap.create(WebArchive.class)
return ShrinkWrap
.create(WebArchive.class)
.addAsLibraries(jars)
.addClasses(WithinWindowMatcher.class, TimerEvent.class, TimerEventListener.class, ScheduleTimerBean.class);
}
@ -46,9 +48,15 @@ public class ScheduleTimerBeanIntegrationTest {
Awaitility.setDefaultTimeout(30, TimeUnit.SECONDS);
await().untilCall(to(timerEventListener.getEvents()).size(), equalTo(3));
TimerEvent firstEvent = timerEventListener.getEvents().get(0);
TimerEvent secondEvent = timerEventListener.getEvents().get(1);
TimerEvent thirdEvent = timerEventListener.getEvents().get(2);
TimerEvent firstEvent = timerEventListener
.getEvents()
.get(0);
TimerEvent secondEvent = timerEventListener
.getEvents()
.get(1);
TimerEvent thirdEvent = timerEventListener
.getEvents()
.get(2);
long delay = secondEvent.getTime() - firstEvent.getTime();
assertThat(delay, Matchers.is(WithinWindowMatcher.withinWindow(TIMEOUT, TOLERANCE)));

View File

@ -1,12 +1,9 @@
package com.baeldung;
import junit.framework.Assert;
import org.jooq.lambda.Seq;
import org.jooq.lambda.Unchecked;
import org.jooq.lambda.function.Function1;
import org.jooq.lambda.function.Function2;
import org.jooq.lambda.tuple.Tuple;
import org.jooq.lambda.tuple.Tuple2;
import org.jooq.lambda.tuple.Tuple3;
import org.jooq.lambda.tuple.Tuple4;

15
pom.xml
View File

@ -52,7 +52,7 @@
<module>handling-spring-static-resources</module>
<module>hazelcast</module>
<!--<module>hbase</module> TODO: CI problems-->
<module>hbase</module>
<module>httpclient</module>
<module>hystrix</module>
@ -214,6 +214,7 @@
<module>vertx</module>
<module>spring-data-gemfire</module>
</modules>
<build>
<plugins>
<plugin>
@ -226,6 +227,18 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*IntegrationTest.java</exclude>
<exclude>**/*LongRunningUnitTest.java</exclude>
<exclude>**/*ManualTest.java</exclude>
</excludes>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
<extensions>
<!--<extension>

View File

@ -180,7 +180,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<excludes>
<exclude>**/*IntegrationTest.java</exclude>

View File

@ -3,25 +3,25 @@
*/
package org.baeldung.querydsl.intro;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import org.baeldung.querydsl.intro.entities.BlogPost;
import org.baeldung.querydsl.intro.entities.QBlogPost;
import org.baeldung.querydsl.intro.entities.QUser;
import org.baeldung.querydsl.intro.entities.User;
import com.querydsl.core.Tuple;
import com.querydsl.core.types.dsl.Expressions;
import com.querydsl.core.types.dsl.NumberPath;
import com.querydsl.jpa.JPAExpressions;
import com.querydsl.jpa.impl.JPAQueryFactory;
import org.baeldung.querydsl.intro.entities.BlogPost;
import org.baeldung.querydsl.intro.entities.QBlogPost;
import org.baeldung.querydsl.intro.entities.QUser;
import org.baeldung.querydsl.intro.entities.User;
import org.junit.*;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import java.util.List;
import static org.junit.Assert.*;
public class QueryDSLTest {
public class QueryDSLIntegrationTest {
private static EntityManagerFactory emf;

View File

@ -17,6 +17,18 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*IntegrationTest.java</exclude>
<exclude>**/*LongRunningUnitTest.java</exclude>
<exclude>**/*ManualTest.java</exclude>
</excludes>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>
@ -47,4 +59,5 @@
<hamcrest.version>1.3</hamcrest.version>
</properties>
</project>

View File

@ -14,7 +14,7 @@ import java.util.stream.IntStream;
import static org.junit.Assert.assertTrue;
public class RxJavaBackpressureTest {
public class RxJavaBackpressureLongRunningUnitTest {
@Test
public void givenColdObservable_shouldNotThrowException() {

View File

@ -15,11 +15,12 @@ import org.springframework.test.context.junit4.SpringRunner;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.verify;
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT;
@RunWith(SpringRunner.class)
@ActiveProfiles("test")
@SpringBootTest(webEnvironment=SpringBootTest.WebEnvironment.RANDOM_PORT)
public class MessageControllerTest {
@SpringBootTest(webEnvironment = RANDOM_PORT)
public class MessageControllerIntegrationTest {
@Autowired
private TestRestTemplate restTemplate;

View File

@ -15,11 +15,6 @@
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
@ -28,7 +23,6 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

View File

@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung</groupId>
<artifactId>jooq-spring</artifactId>
<artifactId>sprin-jooq</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencyManagement>