forked from jooby-project/jooby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
An failing test to demonstrate jooby-project#732
- Loading branch information
1 parent
1ef2c40
commit f341eac
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
coverage-report/src/test/java/org/jooby/issues/Issue732.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.jooby.issues; | ||
|
||
import com.typesafe.config.ConfigFactory; | ||
import com.typesafe.config.ConfigValueFactory; | ||
import org.jooby.jedis.Redis; | ||
import org.jooby.test.ServerFeature; | ||
import org.junit.Test; | ||
import redis.clients.jedis.Jedis; | ||
|
||
public class Issue732 extends ServerFeature { | ||
|
||
{ | ||
|
||
use(ConfigFactory | ||
.empty() | ||
.withValue("db", | ||
ConfigValueFactory.fromAnyRef("redis://localhost:6379"))); | ||
|
||
use(new Redis()); | ||
|
||
get("/Issue732", () -> { | ||
try (Jedis jedis = require(Jedis.class)) { | ||
jedis.get("dummy"); | ||
return "Hello World!"; | ||
} | ||
}); | ||
|
||
} | ||
|
||
@Test | ||
public void appShouldBeAbleToServeTwoRequestsWithJedisConnection() throws Exception { | ||
request().get("/Issue732").expect(200); | ||
request().get("/Issue732").expect(200); | ||
} | ||
} |