Skip to content

Commit

Permalink
merged with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Bonér committed Mar 30, 2010
2 parents 2c6a8ae + 6732535 commit 84ee350
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
Expand Up @@ -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)
}

Expand All @@ -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)
}

Expand All @@ -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)
}
}
Expand Up @@ -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)
}

Expand All @@ -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)
}

Expand All @@ -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)
}

Expand All @@ -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
Expand All @@ -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)
}
}
3 changes: 2 additions & 1 deletion akka-security/src/main/scala/Security.scala
Expand Up @@ -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])
Expand Down
Binary file not shown.
Binary file not shown.
Expand Up @@ -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>
3 changes: 1 addition & 2 deletions project/build/AkkaProject.scala
Expand Up @@ -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")
}
Expand Down

0 comments on commit 84ee350

Please sign in to comment.