merged with upstream

This commit is contained in:
Jonas Bonér 2010-03-30 23:04:05 +02:00
commit 48ff060ddb
7 changed files with 18 additions and 18 deletions

View file

@ -111,7 +111,7 @@ class RedisPersistentActorSpec extends TestCase {
bactor !! Debit("a-123", 8000, failer)
assertEquals(BigInt(1000), (bactor !! Balance("a-123")).get)
val c: Integer = (bactor !! LogSize).get
val c: Int = (bactor !! LogSize).get
assertTrue(7 == c)
}
@ -132,7 +132,7 @@ class RedisPersistentActorSpec extends TestCase {
assertEquals(BigInt(5000), (bactor !! Balance("a-123")).get)
// should not count the failed one
val c: Integer = (bactor !! LogSize).get
val c: Int = (bactor !! LogSize).get
assertTrue(3 == c)
}
@ -154,7 +154,7 @@ class RedisPersistentActorSpec extends TestCase {
assertEquals(BigInt(5000), (bactor !! (Balance("a-123"), 5000)).get)
// should not count the failed one
val c: Integer = (bactor !! LogSize).get
val c: Int = (bactor !! LogSize).get
assertTrue(3 == c)
}
}

View file

@ -58,7 +58,7 @@ class RedisPersistentQSpec extends TestCase {
qa !! NQ("a-123")
qa !! NQ("a-124")
qa !! NQ("a-125")
val t: Integer = (qa !! SZ).get
val t: Int = (qa !! SZ).get
assertTrue(3 == t)
}
@ -69,12 +69,12 @@ class RedisPersistentQSpec extends TestCase {
qa !! NQ("a-123")
qa !! NQ("a-124")
qa !! NQ("a-125")
val s: Integer = (qa !! SZ).get
val s: Int = (qa !! SZ).get
assertTrue(3 == s)
assertEquals("a-123", (qa !! DQ).get)
assertEquals("a-124", (qa !! DQ).get)
assertEquals("a-125", (qa !! DQ).get)
val t: Integer = (qa !! SZ).get
val t: Int = (qa !! SZ).get
assertTrue(0 == t)
}
@ -88,13 +88,13 @@ class RedisPersistentQSpec extends TestCase {
qa !! NQ("a-123")
qa !! NQ("a-124")
qa !! NQ("a-125")
val t: Integer = (qa !! SZ).get
val t: Int = (qa !! SZ).get
assertTrue(3 == t)
assertEquals("a-123", (qa !! DQ).get)
val s: Integer = (qa !! SZ).get
val s: Int = (qa !! SZ).get
assertTrue(2 == s)
qa !! MNDQ(List("a-126", "a-127"), 2, failer)
val u: Integer = (qa !! SZ).get
val u: Int = (qa !! SZ).get
assertTrue(2 == u)
}
@ -110,25 +110,25 @@ class RedisPersistentQSpec extends TestCase {
qa !! NQ("a-124")
qa !! NQ("a-125")
val t: Integer = (qa !! SZ).get
val t: Int = (qa !! SZ).get
assertTrue(3 == t)
// dequeue 1
assertEquals("a-123", (qa !! DQ).get)
// size == 2
val s: Integer = (qa !! SZ).get
val s: Int = (qa !! SZ).get
assertTrue(2 == s)
// enqueue 2, dequeue 2 => size == 2
qa !! MNDQ(List("a-126", "a-127"), 2, failer)
val u: Integer = (qa !! SZ).get
val u: Int = (qa !! SZ).get
assertTrue(2 == u)
// enqueue 2 => size == 4
qa !! NQ("a-128")
qa !! NQ("a-129")
val v: Integer = (qa !! SZ).get
val v: Int = (qa !! SZ).get
assertTrue(4 == v)
// enqueue 1 => size 5
@ -138,7 +138,7 @@ class RedisPersistentQSpec extends TestCase {
qa !! MNDQ(List("a-130"), 6, failer)
} catch { case e: Exception => {} }
val w: Integer = (qa !! SZ).get
val w: Int = (qa !! SZ).get
assertTrue(4 == w)
}
}

View file

@ -87,7 +87,8 @@ class AkkaSecurityFilterFactory extends ResourceFilterFactory with Logging {
override def filter(request: ContainerRequest): ContainerRequest =
rolesAllowed match {
case Some(roles) => {
(authenticator.!![AnyRef](Authenticate(request, roles), 10000)) match {
val result : Option[AnyRef] = authenticator !! Authenticate(request, roles)
result match {
case Some(OK) => request
case Some(r) if r.isInstanceOf[Response] =>
throw new WebApplicationException(r.asInstanceOf[Response])

View file

@ -3,6 +3,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.redis</groupId>
<artifactId>redisclient</artifactId>
<version>2.8.0.Beta1-1.2-SNAPSHOT</version>
<version>2.8.0.Beta1-1.2</version>
<packaging>jar</packaging>
</project>

View file

@ -328,8 +328,7 @@ class AkkaParent(info: ProjectInfo) extends AkkaDefaults(info) {
}
class AkkaRedisProject(info: ProjectInfo) extends AkkaDefaults(info) {
// val redis = "com.redis" % "redisclient" % "2.8.0.Beta1-1.2-SNAPSHOT" % "compile"
val redis = "com.redis" % "redisclient" % "1.2" % "compile"
val redis = "com.redis" % "redisclient" % "2.8.0.Beta1-1.2" % "compile"
override def testOptions = TestFilter((name: String) => name.endsWith("Test")) :: Nil
lazy val dist = deployTask(info, distPath) dependsOn(`package`, packageDocs, packageSrc) describedAs("Deploying")
}