Skip to content

Commit

Permalink
#84 test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 13, 2017
1 parent 1dc1cbf commit b0f5932
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/test/java/org/jpeek/web/AsyncReportsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.concurrent.TimeUnit;
import org.cactoos.BiFunc;
import org.cactoos.Func;
import org.cactoos.func.SolidBiFunc;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
import org.takes.Response;
Expand All @@ -51,11 +52,13 @@ public void rendersOneReport() throws Exception {
final ExecutorService service = Executors.newSingleThreadExecutor();
final BiFunc<String, String, Func<String, Response>> bifunc =
new AsyncReports(
(first, second) -> service.submit(
() -> input -> {
TimeUnit.HOURS.sleep(1L);
return new RsText("done!");
}
new SolidBiFunc<>(
(first, second) -> service.submit(
() -> input -> {
TimeUnit.HOURS.sleep(1L);
return new RsText("done!");
}
)
)
);
final Response response =
Expand Down

0 comments on commit b0f5932

Please sign in to comment.