You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by ma...@apache.org on 2014/04/07 23:20:20 UTC

git commit: SAMZA-223: Fix tests to use ScalaTest 1.9.2 APIs.

Repository: incubator-samza
Updated Branches:
  refs/heads/master 4b8514f22 -> 7b4204572


SAMZA-223: Fix tests to use ScalaTest 1.9.2 APIs.


Project: http://git-wip-us.apache.org/repos/asf/incubator-samza/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-samza/commit/7b420457
Tree: http://git-wip-us.apache.org/repos/asf/incubator-samza/tree/7b420457
Diff: http://git-wip-us.apache.org/repos/asf/incubator-samza/diff/7b420457

Branch: refs/heads/master
Commit: 7b42045726151eba85efa39d7739d29ae84adad7
Parents: 4b8514f
Author: Martin Kleppmann <mk...@linkedin.com>
Authored: Mon Apr 7 14:17:39 2014 -0700
Committer: Martin Kleppmann <mk...@linkedin.com>
Committed: Mon Apr 7 14:17:58 2014 -0700

----------------------------------------------------------------------
 .../org/apache/samza/system/TestStreamMetadataCache.scala      | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-samza/blob/7b420457/samza-core/src/test/scala/org/apache/samza/system/TestStreamMetadataCache.scala
----------------------------------------------------------------------
diff --git a/samza-core/src/test/scala/org/apache/samza/system/TestStreamMetadataCache.scala b/samza-core/src/test/scala/org/apache/samza/system/TestStreamMetadataCache.scala
index 264d1b5..89ea078 100644
--- a/samza-core/src/test/scala/org/apache/samza/system/TestStreamMetadataCache.scala
+++ b/samza-core/src/test/scala/org/apache/samza/system/TestStreamMetadataCache.scala
@@ -24,12 +24,12 @@ import org.apache.samza.system.SystemStreamMetadata.SystemStreamPartitionMetadat
 import org.apache.samza.util.Clock
 import org.junit.{Before, Test}
 import org.mockito.Mockito._
-import org.scalatest.Matchers._
+import org.scalatest.matchers.ShouldMatchers
 import org.scalatest.junit.AssertionsForJUnit
 import org.scalatest.mock.MockitoSugar
 import scala.collection.JavaConversions._
 
-class TestStreamMetadataCache extends AssertionsForJUnit with MockitoSugar {
+class TestStreamMetadataCache extends AssertionsForJUnit with MockitoSugar with ShouldMatchers {
   def makeMetadata(streamNames: Set[String] = Set("stream"), numPartitions: Int = 4) = {
     val partitions = (0 until numPartitions).map(partition => {
       new Partition(partition) -> new SystemStreamPartitionMetadata("oldest", "newest", "upcoming")
@@ -46,7 +46,7 @@ class TestStreamMetadataCache extends AssertionsForJUnit with MockitoSugar {
 
     val result = cache.getStreamMetadata(streams)
     streams shouldEqual result.keySet
-    result(new SystemStream("foo", "bar")).getSystemStreamPartitionMetadata.size shouldBe 4
+    result(new SystemStream("foo", "bar")).getSystemStreamPartitionMetadata.size should equal(4)
     verify(systemAdmins("foo"), times(1)).getSystemStreamMetadata(Set("bar"))
   }