Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Robey Pointer committed May 30, 2012
1 parent 3efbe98 commit b83655f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/net/lag/kestrel/KestrelHandler.scala
Expand Up @@ -180,7 +180,7 @@ abstract class KestrelHandler(
case None =>
f(None, None)
case x @ Some(item) =>
val xidContext = if (opening) addPendingRead(key, item.xid) else None
val xidContext = if (opening) addPendingRead(key, item.id) else None
f(x, xidContext)
monitorLoop(maxItems - 1)
}
Expand Down
10 changes: 5 additions & 5 deletions src/test/scala/net/lag/kestrel/KestrelHandlerSpec.scala
Expand Up @@ -105,16 +105,16 @@ class KestrelHandlerSpec extends Specification with TempFolder with TestLogging
queues = new QueueCollection(folderName, timer, scheduler, config, Nil)
val handler = new FakeKestrelHandler(queues, 10)

handler.setItem("test", 0, None, "one".getBytes)
handler.setItem("test", 0, None, "two".getBytes)
handler.setItem("test", 0, None, "three".getBytes)
handler.setItem("test", 0, None, stringToBuffer("one"))
handler.setItem("test", 0, None, stringToBuffer("two"))
handler.setItem("test", 0, None, stringToBuffer("three"))
Stats.getCounter("cmd_set")() mustEqual 3
Stats.getCounter("cmd_get")() mustEqual 0
Stats.getCounter("cmd_monitor")() mustEqual 0
Stats.getCounter("cmd_monitor_get")() mustEqual 0

val items = new mutable.ListBuffer[Option[QItem]]()
def addItem(item: Option[QItem], xid: Option[Long]) { items.append(item) }
val items = new mutable.ListBuffer[Option[QueueItem]]()
def addItem(item: Option[QueueItem], xid: Option[Long]) { items.append(item) }

handler.monitorUntil("test", Some(1.hour.fromNow), 2, false)(addItem)
items.size mustEqual 3
Expand Down

0 comments on commit b83655f

Please sign in to comment.