kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nehanarkh...@apache.org
Subject svn commit: r1198536 - /incubator/kafka/trunk/core/src/test/scala/unit/kafka/message/CompressionUtilsTest.scala
Date Sun, 06 Nov 2011 19:07:21 GMT
Author: nehanarkhede
Date: Sun Nov  6 19:07:20 2011
New Revision: 1198536

URL: http://svn.apache.org/viewvc?rev=1198536&view=rev
Log:
KAFKA-192 CompressionUtilTest does not run and fails when it does;patched by joestein;reviewed
by nehanarkhede

Modified:
    incubator/kafka/trunk/core/src/test/scala/unit/kafka/message/CompressionUtilsTest.scala

Modified: incubator/kafka/trunk/core/src/test/scala/unit/kafka/message/CompressionUtilsTest.scala
URL: http://svn.apache.org/viewvc/incubator/kafka/trunk/core/src/test/scala/unit/kafka/message/CompressionUtilsTest.scala?rev=1198536&r1=1198535&r2=1198536&view=diff
==============================================================================
--- incubator/kafka/trunk/core/src/test/scala/unit/kafka/message/CompressionUtilsTest.scala
(original)
+++ incubator/kafka/trunk/core/src/test/scala/unit/kafka/message/CompressionUtilsTest.scala
Sun Nov  6 19:07:20 2011
@@ -17,13 +17,14 @@
 
 package kafka.message
 
-import junit.framework.TestCase
 import kafka.utils.TestUtils
+import org.scalatest.junit.JUnitSuite
+import org.junit.Test
 
-class CompressionUtilTest extends TestCase {
+class CompressionUtilTest extends JUnitSuite {
 
   
-
+  @Test
   def testSimpleCompressDecompress() {
 
     val messages = List[Message](new Message("hi there".getBytes), new Message("I am fine".getBytes),
new Message("I am not so well today".getBytes))
@@ -34,9 +35,10 @@ class CompressionUtilTest extends TestCa
 
     TestUtils.checkLength(decompressedMessages.iterator,3)
 
-    TestUtils.checkEquals(messages.iterator, decompressedMessages.iterator)
+    TestUtils.checkEquals(messages.iterator, TestUtils.getMessageIterator(decompressedMessages.iterator))
   }
 
+  @Test
   def testComplexCompressDecompress() {
 
     val messages = List[Message](new Message("hi there".getBytes), new Message("I am fine".getBytes),
new Message("I am not so well today".getBytes))
@@ -49,10 +51,8 @@ class CompressionUtilTest extends TestCa
 
     val decompressedMessages = CompressionUtils.decompress(complexMessage)
 
-    TestUtils.checkLength(decompressedMessages.iterator,2)
-
-    TestUtils.checkLength(decompressedMessages.iterator,3)
+    TestUtils.checkLength(TestUtils.getMessageIterator(decompressedMessages.iterator),3)
 
-    TestUtils.checkEquals(messages.iterator, decompressedMessages.iterator)
+    TestUtils.checkEquals(messages.iterator, TestUtils.getMessageIterator(decompressedMessages.iterator))
   }
 }



Mime
View raw message