Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
d-t-w committed May 7, 2024
1 parent 8f5e5bb commit 5a2be97
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions test/io/factorhouse/agent_test.clj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(ns io.factorhouse.agent-test
(:require [clojure.test :refer :all]
[clojure.core.protocols :as p]
(:require [clojure.core.protocols :as p]
[clojure.test :refer :all]
[io.factorhouse.kpow.agent :as agent])
(:import (org.apache.kafka.streams Topology StreamsBuilder KafkaStreams$State)
(org.apache.kafka.common MetricName Metric)
(:import (io.factorhouse.kpow StreamsRegistry)
(java.util Properties)
(org.apache.kafka.clients.producer Producer)
(io.factorhouse.kpow StreamsRegistry)
(java.util Properties)))
(org.apache.kafka.common Metric MetricName)
(org.apache.kafka.streams KafkaStreams$State StreamsBuilder Topology)))

(defn ^Properties ->props [m]
(let [props (Properties.)]
Expand All @@ -15,13 +15,16 @@
props))

(deftest filter-props
(is (= {"compression.type" "gzip"}
(is (= {"compression.type" "gzip"
"enable.idempotence" "false"}
(StreamsRegistry/filterProperties (->props {"fo" "bar"}))))
(is (= {"bootstrap.servers" "xyz"
"compression.type" "lz4"}
(is (= {"bootstrap.servers" "xyz"
"compression.type" "lz4"
"enable.idempotence" "false"}
(into {} (StreamsRegistry/filterProperties (->props {"compression.type" "lz4" "bootstrap.servers" "xyz"})))))
(is (= {"bootstrap.servers" "xyz"
"compression.type" "gzip"}
(is (= {"bootstrap.servers" "xyz"
"compression.type" "gzip"
"enable.idempotence" "false"}
(into {} (StreamsRegistry/filterProperties (->props {"fo" "bar" "bootstrap.servers" "xyz"}))))))

(defn ^Topology test-topology
Expand Down

0 comments on commit 5a2be97

Please sign in to comment.