Skip to content

Commit

Permalink
Increase timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich authored and pjfanning committed Nov 21, 2023
1 parent 7d1a70a commit 03d4c23
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions slick/src/test/java/docs/javadsl/SlickTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,37 +129,37 @@ public void testSinkPSThatThrowException() {
assertThrows(
ExecutionException.class,
() ->
usersSource.runWith(slickSink, system).toCompletableFuture().get(5, TimeUnit.SECONDS));
usersSource.runWith(slickSink, system).toCompletableFuture().get(10, TimeUnit.SECONDS));
}

@Test
public void testSinkWithoutParallelismAndReadBackWithSource() throws Exception {
final Sink<User, CompletionStage<Done>> slickSink = Slick.sink(session, insertUser);
usersSource.runWith(slickSink, system).toCompletableFuture().get(5, TimeUnit.SECONDS);
usersSource.runWith(slickSink, system).toCompletableFuture().get(10, TimeUnit.SECONDS);

assertEqualsUsers();
}

@Test
public void testSinkPSWithoutParallelismAndReadBackWithSource() throws Exception {
final Sink<User, CompletionStage<Done>> slickSink = Slick.sink(session, insertUserPS);
usersSource.runWith(slickSink, system).toCompletableFuture().get(5, TimeUnit.SECONDS);
usersSource.runWith(slickSink, system).toCompletableFuture().get(10, TimeUnit.SECONDS);

assertEqualsUsers();
}

@Test
public void testSinkWithParallelismOf4AndReadBackWithSource() throws Exception {
final Sink<User, CompletionStage<Done>> slickSink = Slick.sink(session, 4, insertUser);
usersSource.runWith(slickSink, system).toCompletableFuture().get(5, TimeUnit.SECONDS);
usersSource.runWith(slickSink, system).toCompletableFuture().get(10, TimeUnit.SECONDS);

assertEqualsUsers();
}

@Test
public void testSinkPSWithParallelismOf4AndReadBackWithSource() throws Exception {
final Sink<User, CompletionStage<Done>> slickSink = Slick.sink(session, 4, insertUserPS);
usersSource.runWith(slickSink, system).toCompletableFuture().get(5, TimeUnit.SECONDS);
usersSource.runWith(slickSink, system).toCompletableFuture().get(10, TimeUnit.SECONDS);

assertEqualsUsers();
}
Expand All @@ -178,7 +178,7 @@ public void testFlowPSWithRecover() throws Exception {
.via(slickFlow)
.runWith(Sink.seq(), system)
.toCompletableFuture()
.get(5, TimeUnit.SECONDS);
.get(10, TimeUnit.SECONDS);

assertEquals(insertionResult.size(), 1);
assertEquals(insertionResult.get(0), Integer.valueOf(-1));
Expand All @@ -192,7 +192,7 @@ public void testFlowWithoutParallelismAndReadBackWithSource() throws Exception {
.via(slickFlow)
.runWith(Sink.seq(), system)
.toCompletableFuture()
.get(5, TimeUnit.SECONDS);
.get(10, TimeUnit.SECONDS);

assertEquals(users.size(), insertionResult.size());
assertEqualsUsers();
Expand All @@ -206,7 +206,7 @@ public void testFlowPSWithoutParallelismAndReadBackWithSource() throws Exception
.via(slickFlow)
.runWith(Sink.seq(), system)
.toCompletableFuture()
.get(5, TimeUnit.SECONDS);
.get(10, TimeUnit.SECONDS);

assertEquals(users.size(), insertionResult.size());
assertEqualsUsers();
Expand All @@ -220,7 +220,7 @@ public void testFlowWithParallelismOf4AndReadBackWithSource() throws Exception {
.via(slickFlow)
.runWith(Sink.seq(), system)
.toCompletableFuture()
.get(5, TimeUnit.SECONDS);
.get(10, TimeUnit.SECONDS);

assertEquals(users.size(), insertionResult.size());
assertEqualsUsers();
Expand All @@ -234,7 +234,7 @@ public void testFlowPSWithParallelismOf4AndReadBackWithSource() throws Exception
.via(slickFlow)
.runWith(Sink.seq(), system)
.toCompletableFuture()
.get(5, TimeUnit.SECONDS);
.get(10, TimeUnit.SECONDS);

assertEquals(users.size(), insertionResult.size());
assertEqualsUsers();
Expand All @@ -249,7 +249,7 @@ public void testFlowWithPassThroughWithoutParallelismAndReadBackWithSource() thr
.via(slickFlow)
.runWith(Sink.seq(), system)
.toCompletableFuture()
.get(5, TimeUnit.SECONDS);
.get(10, TimeUnit.SECONDS);

assertEquals(SlickTest.users, new HashSet<>(insertedUsers));
assertEqualsUsers();
Expand All @@ -264,7 +264,7 @@ public void testFlowPSWithPassThroughWithoutParallelismAndReadBackWithSource() t
.via(slickFlow)
.runWith(Sink.seq(), system)
.toCompletableFuture()
.get(5, TimeUnit.SECONDS);
.get(10, TimeUnit.SECONDS);

assertEquals(SlickTest.users, new HashSet<>(insertedUsers));
assertEqualsUsers();
Expand All @@ -279,7 +279,7 @@ public void testFlowWithPassThroughWithParallelismOf4AndReadBackWithSource() thr
.via(slickFlow)
.runWith(Sink.seq(), system)
.toCompletableFuture()
.get(5, TimeUnit.SECONDS);
.get(10, TimeUnit.SECONDS);

assertEquals(users, new HashSet<>(insertedUsers));
assertEqualsUsers();
Expand All @@ -294,7 +294,7 @@ public void testFlowPSWithPassThroughWithParallelismOf4AndReadBackWithSource() t
.via(slickFlow)
.runWith(Sink.seq(), system)
.toCompletableFuture()
.get(5, TimeUnit.SECONDS);
.get(10, TimeUnit.SECONDS);

assertEquals(users, new HashSet<>(insertedUsers));
assertEqualsUsers();
Expand Down Expand Up @@ -335,7 +335,7 @@ public void testFlowWithPassThroughKafkaExample() throws Exception {
return commitToKafka.apply(kafkaMessage.offset);
})
.runWith(Sink.ignore(), system);
resultFuture.toCompletableFuture().get(5, TimeUnit.SECONDS);
resultFuture.toCompletableFuture().get(10, TimeUnit.SECONDS);

assertEquals(users.size(), committedOffsets.size());
assertEqualsUsers();
Expand All @@ -348,7 +348,7 @@ private void assertEqualsUsers() throws Exception {

final CompletionStage<List<User>> foundUsersFuture = slickSource.runWith(Sink.seq(), system);
final Set<User> foundUsers =
new HashSet<>(foundUsersFuture.toCompletableFuture().get(3, TimeUnit.SECONDS));
new HashSet<>(foundUsersFuture.toCompletableFuture().get(10, TimeUnit.SECONDS));

assertEquals(foundUsers, users);
}
Expand All @@ -358,7 +358,7 @@ private static void executeStatement(String statement, SlickSession session, Act
Source.single(statement)
.runWith(Slick.sink(session), system)
.toCompletableFuture()
.get(3, TimeUnit.SECONDS);
.get(10, TimeUnit.SECONDS);
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit 03d4c23

Please sign in to comment.