kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch trunk updated: MINOR: fix scala serde tests (#5644)
Date Thu, 13 Sep 2018 15:29:16 GMT
This is an automated email from the ASF dual-hosted git repository.

guozhang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new b18c8dd  MINOR: fix scala serde tests (#5644)
b18c8dd is described below

commit b18c8dda525a18c1ade7377a408aabd2254bb6d7
Author: John Roesler <vvcephei@users.noreply.github.com>
AuthorDate: Thu Sep 13 10:29:07 2018 -0500

    MINOR: fix scala serde tests (#5644)
    
    Reviewers: Guozhang Wang <wangguoz@gmail.com>
---
 .../kafka/streams/scala/kstream/ConsumedTest.scala   | 16 ++++++++--------
 .../kafka/streams/scala/kstream/JoinedTest.scala     |  6 +++---
 .../streams/scala/kstream/MaterializedTest.scala     | 20 ++++++++++----------
 .../kafka/streams/scala/kstream/ProducedTest.scala   |  8 ++++----
 .../kafka/streams/scala/kstream/SerializedTest.scala |  4 ++--
 5 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/ConsumedTest.scala
b/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/ConsumedTest.scala
index 87b478c..f45467c 100644
--- a/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/ConsumedTest.scala
+++ b/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/ConsumedTest.scala
@@ -34,8 +34,8 @@ class ConsumedTest extends FlatSpec with Matchers {
     val consumed: Consumed[String, Long] = Consumed.`with`[String, Long]
 
     val internalConsumed = new ConsumedInternal(consumed)
-    internalConsumed.keySerde shouldBe Serdes.String
-    internalConsumed.valueSerde shouldBe Serdes.Long
+    internalConsumed.keySerde.getClass shouldBe Serdes.String.getClass
+    internalConsumed.valueSerde.getClass shouldBe Serdes.Long.getClass
   }
 
   "Create a Consumed with timestampExtractor and resetPolicy" should "create a Consumed with
Serdes, timestampExtractor and resetPolicy" in {
@@ -45,8 +45,8 @@ class ConsumedTest extends FlatSpec with Matchers {
       Consumed.`with`[String, Long](timestampExtractor, resetPolicy)
 
     val internalConsumed = new ConsumedInternal(consumed)
-    internalConsumed.keySerde shouldBe Serdes.String
-    internalConsumed.valueSerde shouldBe Serdes.Long
+    internalConsumed.keySerde.getClass shouldBe Serdes.String.getClass
+    internalConsumed.valueSerde.getClass shouldBe Serdes.Long.getClass
     internalConsumed.timestampExtractor shouldBe timestampExtractor
     internalConsumed.offsetResetPolicy shouldBe resetPolicy
   }
@@ -56,8 +56,8 @@ class ConsumedTest extends FlatSpec with Matchers {
     val consumed: Consumed[String, Long] = Consumed.`with`[String, Long](timestampExtractor)
 
     val internalConsumed = new ConsumedInternal(consumed)
-    internalConsumed.keySerde shouldBe Serdes.String
-    internalConsumed.valueSerde shouldBe Serdes.Long
+    internalConsumed.keySerde.getClass shouldBe Serdes.String.getClass
+    internalConsumed.valueSerde.getClass shouldBe Serdes.Long.getClass
     internalConsumed.timestampExtractor shouldBe timestampExtractor
   }
 
@@ -66,8 +66,8 @@ class ConsumedTest extends FlatSpec with Matchers {
     val consumed: Consumed[String, Long] = Consumed.`with`[String, Long](resetPolicy)
 
     val internalConsumed = new ConsumedInternal(consumed)
-    internalConsumed.keySerde shouldBe Serdes.String
-    internalConsumed.valueSerde shouldBe Serdes.Long
+    internalConsumed.keySerde.getClass shouldBe Serdes.String.getClass
+    internalConsumed.valueSerde.getClass shouldBe Serdes.Long.getClass
     internalConsumed.offsetResetPolicy shouldBe resetPolicy
   }
 }
diff --git a/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/JoinedTest.scala
b/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/JoinedTest.scala
index f9fcbb5..288b790 100644
--- a/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/JoinedTest.scala
+++ b/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/JoinedTest.scala
@@ -30,8 +30,8 @@ class JoinedTest extends FlatSpec with Matchers {
   "Create a Joined" should "create a Joined with Serdes" in {
     val joined: Joined[String, Long, Int] = Joined.`with`[String, Long, Int]
 
-    joined.keySerde shouldBe Serdes.String
-    joined.valueSerde shouldBe Serdes.Long
-    joined.otherValueSerde shouldBe Serdes.Integer
+    joined.keySerde.getClass shouldBe Serdes.String.getClass
+    joined.valueSerde.getClass shouldBe Serdes.Long.getClass
+    joined.otherValueSerde.getClass shouldBe Serdes.Integer.getClass
   }
 }
diff --git a/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/MaterializedTest.scala
b/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/MaterializedTest.scala
index 8d24efe..14fc5d4 100644
--- a/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/MaterializedTest.scala
+++ b/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/MaterializedTest.scala
@@ -34,8 +34,8 @@ class MaterializedTest extends FlatSpec with Matchers {
       Materialized.`with`[String, Long, ByteArrayKeyValueStore]
 
     val internalMaterialized = new MaterializedInternal(materialized)
-    internalMaterialized.keySerde shouldBe Serdes.String
-    internalMaterialized.valueSerde shouldBe Serdes.Long
+    internalMaterialized.keySerde.getClass shouldBe Serdes.String.getClass
+    internalMaterialized.valueSerde.getClass shouldBe Serdes.Long.getClass
   }
 
   "Create a Materialize with a store name" should "create a Materialized with Serdes and
a store name" in {
@@ -44,8 +44,8 @@ class MaterializedTest extends FlatSpec with Matchers {
       Materialized.as[String, Long, ByteArrayKeyValueStore](storeName)
 
     val internalMaterialized = new MaterializedInternal(materialized)
-    internalMaterialized.keySerde shouldBe Serdes.String
-    internalMaterialized.valueSerde shouldBe Serdes.Long
+    internalMaterialized.keySerde.getClass shouldBe Serdes.String.getClass
+    internalMaterialized.valueSerde.getClass shouldBe Serdes.Long.getClass
     internalMaterialized.storeName shouldBe storeName
   }
 
@@ -55,8 +55,8 @@ class MaterializedTest extends FlatSpec with Matchers {
       Materialized.as[String, Long](storeSupplier)
 
     val internalMaterialized = new MaterializedInternal(materialized)
-    internalMaterialized.keySerde shouldBe Serdes.String
-    internalMaterialized.valueSerde shouldBe Serdes.Long
+    internalMaterialized.keySerde.getClass shouldBe Serdes.String.getClass
+    internalMaterialized.valueSerde.getClass shouldBe Serdes.Long.getClass
     internalMaterialized.storeSupplier shouldBe storeSupplier
   }
 
@@ -66,8 +66,8 @@ class MaterializedTest extends FlatSpec with Matchers {
       Materialized.as[String, Long](storeSupplier)
 
     val internalMaterialized = new MaterializedInternal(materialized)
-    internalMaterialized.keySerde shouldBe Serdes.String
-    internalMaterialized.valueSerde shouldBe Serdes.Long
+    internalMaterialized.keySerde.getClass shouldBe Serdes.String.getClass
+    internalMaterialized.valueSerde.getClass shouldBe Serdes.Long.getClass
     internalMaterialized.storeSupplier shouldBe storeSupplier
   }
 
@@ -77,8 +77,8 @@ class MaterializedTest extends FlatSpec with Matchers {
       Materialized.as[String, Long](storeSupplier)
 
     val internalMaterialized = new MaterializedInternal(materialized)
-    internalMaterialized.keySerde shouldBe Serdes.String
-    internalMaterialized.valueSerde shouldBe Serdes.Long
+    internalMaterialized.keySerde.getClass shouldBe Serdes.String.getClass
+    internalMaterialized.valueSerde.getClass shouldBe Serdes.Long.getClass
     internalMaterialized.storeSupplier shouldBe storeSupplier
   }
 }
diff --git a/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/ProducedTest.scala
b/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/ProducedTest.scala
index 7a248ab..ee405b3 100644
--- a/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/ProducedTest.scala
+++ b/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/ProducedTest.scala
@@ -33,8 +33,8 @@ class ProducedTest extends FlatSpec with Matchers {
     val produced: Produced[String, Long] = Produced.`with`[String, Long]
 
     val internalProduced = new ProducedInternal(produced)
-    internalProduced.keySerde shouldBe Serdes.String
-    internalProduced.valueSerde shouldBe Serdes.Long
+    internalProduced.keySerde.getClass shouldBe Serdes.String.getClass
+    internalProduced.valueSerde.getClass shouldBe Serdes.Long.getClass
   }
 
   "Create a Produced with timestampExtractor and resetPolicy" should "create a Consumed with
Serdes, timestampExtractor and resetPolicy" in {
@@ -44,8 +44,8 @@ class ProducedTest extends FlatSpec with Matchers {
     val produced: Produced[String, Long] = Produced.`with`(partitioner)
 
     val internalConsumed = new ProducedInternal(produced)
-    internalConsumed.keySerde shouldBe Serdes.String
-    internalConsumed.valueSerde shouldBe Serdes.Long
+    internalConsumed.keySerde.getClass shouldBe Serdes.String.getClass
+    internalConsumed.valueSerde.getClass shouldBe Serdes.Long.getClass
     internalConsumed.streamPartitioner shouldBe partitioner
   }
 }
diff --git a/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/SerializedTest.scala
b/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/SerializedTest.scala
index 8c072b8..4264fa5 100644
--- a/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/SerializedTest.scala
+++ b/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/SerializedTest.scala
@@ -32,7 +32,7 @@ class SerializedTest extends FlatSpec with Matchers {
     val serialized: Serialized[String, Long] = Serialized.`with`[String, Long]
 
     val internalSerialized = new SerializedInternal(serialized)
-    internalSerialized.keySerde shouldBe Serdes.String
-    internalSerialized.valueSerde shouldBe Serdes.Long
+    internalSerialized.keySerde.getClass shouldBe Serdes.String.getClass
+    internalSerialized.valueSerde.getClass shouldBe Serdes.Long.getClass
   }
 }


Mime
View raw message