diff --git a/config/config.exs b/config/config.exs index 19685ca..2d5dacd 100644 --- a/config/config.exs +++ b/config/config.exs @@ -15,40 +15,25 @@ config :klife, ] ], producers: [ - %{ - name: :my_batch_producer, - client_id: "my_custom_client_id", - linger_ms: 1_500 - }, - %{ - name: :benchmark_producer_in_flight, - client_id: "my_custom_client_id", - max_in_flight_requests: 10 - }, - %{ - name: :my_batch_compressed_producer, - client_id: "my_custom_client_id", - linger_ms: 1_500, - compression_type: :snappy - }, %{ name: :benchmark_producer, client_id: "my_custom_client_id" }, %{ - name: :batcher_benchmark_producer_1, + name: :benchmark_producer_in_flight, client_id: "my_custom_client_id", - batchers_count: 1 + max_in_flight_requests: 10 }, %{ - name: :batcher_benchmark_producer_2, + name: :test_batch_producer, client_id: "my_custom_client_id", - batchers_count: 2 + linger_ms: 1_500 }, %{ - name: :batcher_benchmark_producer_3, + name: :test_batch_compressed_producer, client_id: "my_custom_client_id", - batchers_count: 3 + linger_ms: 1_500, + compression_type: :snappy } ], topics: [ @@ -65,49 +50,16 @@ config :klife, replication_factor: 2 }, %{ - name: "comression_topic", - producer: :my_batch_compressed_producer - }, - %{ - name: "batcher_benchmark_topic_1", - producer: :batcher_benchmark_producer_1, - num_partitions: 30, - replication_factor: 2 - }, - %{ - name: "batcher_benchmark_topic_2", - producer: :batcher_benchmark_producer_2, - num_partitions: 30, - replication_factor: 2 - }, - %{ - name: "batcher_benchmark_topic_3", - producer: :batcher_benchmark_producer_3, - num_partitions: 30, - replication_factor: 2 - }, - %{ - name: "benchmark_topic_2", - producer: :benchmark_producer, - num_partitions: 6, - replication_factor: 2 - }, - %{ - name: "my_batch_topic", + name: "test_batch_topic", enable_produce: true, - producer: :my_batch_producer + producer: :test_batch_producer }, %{ - name: "topic_b", - enable_produce: true - }, - %{ - name: "topic_c", - enable_produce: true, - producer: :my_batch_producer + name: "test_compression_topic", + producer: :test_batch_compressed_producer }, %{ - name: "my_no_batch_topic", + name: "test_no_batch_topic", enable_produce: true } ] diff --git a/test/producer/producer_test.exs b/test/producer/producer_test.exs index 4dacfe3..9458883 100644 --- a/test/producer/producer_test.exs +++ b/test/producer/producer_test.exs @@ -32,7 +32,7 @@ defmodule Klife.ProducerTest do } cluster = :my_test_cluster_1 - topic = "my_no_batch_topic" + topic = "test_no_batch_topic" assert {:ok, offset} = Producer.produce_sync(record, topic, 1, cluster) @@ -49,7 +49,7 @@ defmodule Klife.ProducerTest do } cluster = :my_test_cluster_1 - topic = "my_no_batch_topic" + topic = "test_no_batch_topic" assert {:ok, offset} = Producer.produce_sync(record, topic, 1, cluster, producer: :benchmark_producer) @@ -61,7 +61,7 @@ defmodule Klife.ProducerTest do test "produce message sync with batch" do cluster = :my_test_cluster_1 - topic = "my_batch_topic" + topic = "test_batch_topic" wait_batch_cycle(cluster, topic) @@ -122,7 +122,7 @@ defmodule Klife.ProducerTest do test "produce message sync with batch and compression" do cluster = :my_test_cluster_1 - topic = "comression_topic" + topic = "test_compression_topic" wait_batch_cycle(cluster, topic) @@ -188,7 +188,7 @@ defmodule Klife.ProducerTest do test "is able to recover from cluster changes" do cluster = :my_test_cluster_1 - topic = "my_no_batch_topic" + topic = "test_no_batch_topic" record = %{ value: :rand.bytes(10),