Skip to content

Commit

Permalink
one more test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Seetaramayya committed Feb 4, 2023
1 parent baf5faa commit 2b1c77e
Showing 1 changed file with 34 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ class ConsumerSettingsSpec

"handle nested kafka-clients properties" in {
val conf = ConfigFactory.parseString("""
org.apache.pekko.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
org.apache.pekko.kafka.consumer.kafka-clients.bootstrap.foo = baz
org.apache.pekko.kafka.consumer.kafka-clients.foo = bar
org.apache.pekko.kafka.consumer.kafka-clients.client.id = client1
akka.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
akka.kafka.consumer.kafka-clients.bootstrap.foo = baz
akka.kafka.consumer.kafka-clients.foo = bar
akka.kafka.consumer.kafka-clients.client.id = client1
""").withFallback(ConfigFactory.load()).getConfig("akka.kafka.consumer")
val settings = ConsumerSettings(conf, new ByteArrayDeserializer, new StringDeserializer)
settings.getProperty("bootstrap.servers") should ===("localhost:9092")
Expand All @@ -46,10 +46,10 @@ class ConsumerSettingsSpec
val conf = ConfigFactory
.parseString(
"""
org.apache.pekko.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
org.apache.pekko.kafka.consumer.kafka-clients.key.deserializer = org.apache.kafka.common.serialization.StringDeserializer
org.apache.pekko.kafka.consumer.kafka-clients.value.deserializer = org.apache.kafka.common.serialization.StringDeserializer
org.apache.pekko.kafka.consumer.kafka-clients.client.id = client1
akka.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
akka.kafka.consumer.kafka-clients.key.deserializer = org.apache.kafka.common.serialization.StringDeserializer
akka.kafka.consumer.kafka-clients.value.deserializer = org.apache.kafka.common.serialization.StringDeserializer
akka.kafka.consumer.kafka-clients.client.id = client1
""")
.withFallback(ConfigFactory.load())
.getConfig("akka.kafka.consumer")
Expand All @@ -59,8 +59,8 @@ class ConsumerSettingsSpec

"handle deserializers passed as args config" in {
val conf = ConfigFactory.parseString("""
org.apache.pekko.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
org.apache.pekko.kafka.consumer.kafka-clients.parallelism = 1
akka.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
akka.kafka.consumer.kafka-clients.parallelism = 1
""").withFallback(ConfigFactory.load()).getConfig("akka.kafka.consumer")
val settings = ConsumerSettings(conf, new ByteArrayDeserializer, new StringDeserializer)
settings.getProperty("bootstrap.servers") should ===("localhost:9092")
Expand All @@ -70,9 +70,9 @@ class ConsumerSettingsSpec
val conf = ConfigFactory
.parseString(
"""
org.apache.pekko.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
org.apache.pekko.kafka.consumer.kafka-clients.value.deserializer = org.apache.kafka.common.serialization.StringDeserializer
org.apache.pekko.kafka.consumer.kafka-clients.client.id = client1
akka.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
akka.kafka.consumer.kafka-clients.value.deserializer = org.apache.kafka.common.serialization.StringDeserializer
akka.kafka.consumer.kafka-clients.client.id = client1
""")
.withFallback(ConfigFactory.load())
.getConfig("akka.kafka.consumer")
Expand All @@ -84,9 +84,9 @@ class ConsumerSettingsSpec
val conf = ConfigFactory
.parseString(
"""
org.apache.pekko.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
org.apache.pekko.kafka.consumer.kafka-clients.key.deserializer = org.apache.kafka.common.serialization.StringDeserializer
org.apache.pekko.kafka.consumer.kafka-clients.client.id = client1
akka.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
akka.kafka.consumer.kafka-clients.key.deserializer = org.apache.kafka.common.serialization.StringDeserializer
akka.kafka.consumer.kafka-clients.client.id = client1
""")
.withFallback(ConfigFactory.load())
.getConfig("akka.kafka.consumer")
Expand All @@ -110,9 +110,9 @@ class ConsumerSettingsSpec
val conf = ConfigFactory
.parseString(
"""
org.apache.pekko.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
org.apache.pekko.kafka.consumer.kafka-clients.key.deserializer = org.apache.kafka.common.serialization.StringDeserializer
org.apache.pekko.kafka.consumer.kafka-clients.client.id = client1
akka.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
akka.kafka.consumer.kafka-clients.key.deserializer = org.apache.kafka.common.serialization.StringDeserializer
akka.kafka.consumer.kafka-clients.client.id = client1
""")
.withFallback(ConfigFactory.load())
.getConfig("akka.kafka.consumer")
Expand All @@ -125,8 +125,8 @@ class ConsumerSettingsSpec

"throw IllegalArgumentException if no value deserializer defined (null case). Key serializer passed as args config" in {
val conf = ConfigFactory.parseString("""
org.apache.pekko.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
org.apache.pekko.kafka.consumer.kafka-clients.client.id = client1
akka.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
akka.kafka.consumer.kafka-clients.client.id = client1
""").withFallback(ConfigFactory.load()).getConfig("akka.kafka.consumer")
val exception = intercept[IllegalArgumentException] {
ConsumerSettings(conf, new ByteArrayDeserializer, null)
Expand All @@ -139,9 +139,9 @@ class ConsumerSettingsSpec
val conf = ConfigFactory
.parseString(
"""
org.apache.pekko.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
org.apache.pekko.kafka.consumer.kafka-clients.key.deserializer = org.apache.kafka.common.serialization.StringDeserializer
org.apache.pekko.kafka.consumer.kafka-clients.client.id = client1
akka.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
akka.kafka.consumer.kafka-clients.key.deserializer = org.apache.kafka.common.serialization.StringDeserializer
akka.kafka.consumer.kafka-clients.client.id = client1
""")
.withFallback(ConfigFactory.load())
.getConfig("akka.kafka.consumer")
Expand All @@ -156,9 +156,9 @@ class ConsumerSettingsSpec
val conf = ConfigFactory
.parseString(
"""
org.apache.pekko.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
org.apache.pekko.kafka.consumer.kafka-clients.value.deserializer = org.apache.kafka.common.serialization.StringDeserializer
org.apache.pekko.kafka.consumer.kafka-clients.client.id = client1
akka.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
akka.kafka.consumer.kafka-clients.value.deserializer = org.apache.kafka.common.serialization.StringDeserializer
akka.kafka.consumer.kafka-clients.client.id = client1
""")
.withFallback(ConfigFactory.load())
.getConfig("akka.kafka.consumer")
Expand All @@ -171,8 +171,8 @@ class ConsumerSettingsSpec

"throw IllegalArgumentException if no key deserializer defined (null case). Value serializer passed as args config" in {
val conf = ConfigFactory.parseString("""
org.apache.pekko.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
org.apache.pekko.kafka.consumer.kafka-clients.client.id = client1
akka.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
akka.kafka.consumer.kafka-clients.client.id = client1
""").withFallback(ConfigFactory.load()).getConfig("akka.kafka.consumer")
val exception = intercept[IllegalArgumentException] {
ConsumerSettings(conf, null, new ByteArrayDeserializer)
Expand All @@ -185,9 +185,9 @@ class ConsumerSettingsSpec
val conf = ConfigFactory
.parseString(
"""
org.apache.pekko.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
org.apache.pekko.kafka.consumer.kafka-clients.value.deserializer = org.apache.kafka.common.serialization.StringDeserializer
org.apache.pekko.kafka.consumer.kafka-clients.client.id = client1
akka.kafka.consumer.kafka-clients.bootstrap.servers = "localhost:9092"
akka.kafka.consumer.kafka-clients.value.deserializer = org.apache.kafka.common.serialization.StringDeserializer
akka.kafka.consumer.kafka-clients.client.id = client1
""")
.withFallback(ConfigFactory.load())
.getConfig("akka.kafka.consumer")
Expand Down Expand Up @@ -250,8 +250,8 @@ object ConsumerSettingsSpec {
}
// #discovery-service
// #discovery-with-config
org.apache.pekko.discovery.method = config
org.apache.pekko.discovery.config.services = {
pekko.discovery.method = config
pekko.discovery.config.services = {
kafkaService1 = {
endpoints = [
{ host = "cat", port = 1233 }
Expand Down

0 comments on commit 2b1c77e

Please sign in to comment.