Merge pull request #197865 from srhb/unbreak-kafka

Unbreak kafka
This commit is contained in:
Thiago Kenji Okada 2022-10-26 15:44:26 +01:00 committed by GitHub
commit 06ccee0e4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 10 deletions

View File

@ -50,7 +50,7 @@ let
kafka.wait_until_succeeds(
"${kafkaPackage}/bin/kafka-topics.sh --create "
+ "--zookeeper zookeeper1:2181 --partitions 1 "
+ "--bootstrap-server localhost:9092 --partitions 1 "
+ "--replication-factor 1 --topic testtopic"
)
kafka.succeed(
@ -58,19 +58,12 @@ let
+ "${kafkaPackage}/bin/kafka-console-producer.sh "
+ "--broker-list localhost:9092 --topic testtopic"
)
'' + (if name == "kafka_0_9" then ''
assert "test 1" in kafka.succeed(
"${kafkaPackage}/bin/kafka-console-consumer.sh "
+ "--zookeeper zookeeper1:2181 --topic testtopic "
+ "--from-beginning --max-messages 1"
)
'' else ''
assert "test 1" in kafka.succeed(
"${kafkaPackage}/bin/kafka-console-consumer.sh "
+ "--bootstrap-server localhost:9092 --topic testtopic "
+ "--from-beginning --max-messages 1"
)
'');
'';
}) { inherit system; });
in with pkgs; {

View File

@ -75,6 +75,10 @@ stdenv.mkDerivation rec {
chmod +x $out/bin\/*
'';
passthru = {
inherit jre; # Used by the NixOS module to select the supported jre
};
meta = with lib; {
homepage = "https://kafka.apache.org";
description = "A high-throughput distributed messaging system";
@ -83,5 +87,4 @@ stdenv.mkDerivation rec {
maintainers = [ maintainers.ragge ];
platforms = platforms.unix;
};
passthru = { inherit jdk17_headless; };
}