Permalink
Browse files

fix merge

  • Loading branch information...
1 parent 3efbe98 commit b83655ff8cd24457c03a51a62843b56df6f8b480 Robey Pointer committed May 30, 2012
View
2 src/main/scala/net/lag/kestrel/KestrelHandler.scala
@@ -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)
}
View
10 src/test/scala/net/lag/kestrel/KestrelHandlerSpec.scala
@@ -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

0 comments on commit b83655f

Please sign in to comment.