The "handoff an item immediately after disconnecting" fails on some systems #117

Open
stass opened this Issue Jan 30, 2013 · 0 comments

Comments

Projects
None yet
1 participant

stass commented Jan 30, 2013

Hi!

I have a linux system where the "handoff an item immediately after disconnecting" test
fails for some reason. I presume, that's because it is a bit slower, as the same test passes on my FreeBSD laptop, or maybe I'm stepping on some concurrency issue.

I used the following change to make the spec retry the test several times. It solves the issue for me.

diff --git a/src/test/scala/net/lag/kestrel/ServerSpec.scala b/src/test/scala/net/lag/kestrel/ServerSpec.scala
index f794411..2ad82d8 100644
--- a/src/test/scala/net/lag/kestrel/ServerSpec.scala
+++ b/src/test/scala/net/lag/kestrel/ServerSpec.scala
@@ -290,7 +290,7 @@ class ServerSpec extends Specification with TempFolder with TestLogging {
         Thread.sleep(10)

         val getClient2 = new TestClient("localhost", PORT)
-        getClient2.get("slow/open") mustEqual "item"
+        getClient2.get("slow/open") must eventually(be_==("item"))
       }
     }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment