Skip to content
This repository
Browse code

Only the weight ordering matters for SqlShard.listDownwardLinks

  • Loading branch information...
commit 066c1ce03cd254ad6bb4972794d79ec7cf201898 1 parent fca29ee
Stu Hood authored February 24, 2012
7  src/test/scala/com/twitter/gizzard/nameserver/SqlShardSpec.scala
@@ -237,8 +237,11 @@ class SqlShardSpec extends ConfiguredSpecification with JMocker with ClassMocker
237 237
         nsShard.addLink(shard(1), shard(100), 2)
238 238
         nsShard.addLink(shard(1), shard(200), 2)
239 239
         nsShard.addLink(shard(1), shard(300), 1)
240  
-        nsShard.listDownwardLinks(shard(1)) mustEqual
241  
-          List(link(100, 2), link(200, 2), link(300, 1))
  240
+        nsShard.listDownwardLinks(shard(1)) must beOneOf(
  241
+          // only the ordering of weights matters
  242
+          List(link(100, 2), link(200, 2), link(300, 1)),
  243
+          List(link(200, 2), link(100, 2), link(300, 1))
  244
+        )
242 245
       }
243 246
 
244 247
       "remove" >> {

0 notes on commit 066c1ce

Please sign in to comment.
Something went wrong with that request. Please try again.