Skip to content

Commit 2bd5983

Browse files
committed
Fixed unit tests
1 parent 1c2e7d9 commit 2bd5983

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Microsoft.Azure.WebJobs.Extensions.Kafka/Output/KafkaProducerFactory.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,14 @@ public ProducerConfig GetProducerConfig(KafkaProducerEntity entity)
121121
SslKeyLocation = resolvedSslKeyLocation,
122122
SslKeyPassword = entity.Attribute.SslKeyPassword,
123123
SslCertificateLocation = resolvedSslCertificationLocation,
124-
SslCaLocation = resolvedSslCaLocation,
125-
CompressionLevel = entity.Attribute.CompressionLevel
124+
SslCaLocation = resolvedSslCaLocation
126125
};
127126

127+
if (entity.Attribute.CompressionLevel != -1)
128+
{
129+
conf.CompressionLevel = entity.Attribute.CompressionLevel;
130+
}
131+
128132
if (entity.Attribute.CompressionType != MessageCompressionType.NotSet)
129133
{
130134
conf.CompressionType = (CompressionType)entity.Attribute.CompressionType;

0 commit comments

Comments
 (0)