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

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

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

Comments

@stass
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant