Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix merge

  • Loading branch information...
commit b83655ff8cd24457c03a51a62843b56df6f8b480 1 parent 3efbe98
Robey Pointer authored
2  src/main/scala/net/lag/kestrel/KestrelHandler.scala
View
@@ -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)
}
10 src/test/scala/net/lag/kestrel/KestrelHandlerSpec.scala
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.