Skip to content

Commit

Permalink
Fixed compression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Lanayx committed Jan 27, 2025
1 parent 97f0128 commit 8f4b289
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests/IntegrationTests/Compression.fs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let tests =

let singleOrBatched = if enableBatching then "batched" else "single"

Log.Debug("Started Send and receive {0} compressed message using '{1}'", singleOrBatched, compressionType)
Log.Debug("Started Send and receive {0} compressed message using {1}", singleOrBatched, compressionType)

let client = getClient()
let topicName = "public/default/topic-" + Guid.NewGuid().ToString("N")
Expand Down Expand Up @@ -61,23 +61,26 @@ let tests =

do! Task.WhenAll(producerTask, consumerTask)

Log.Debug("Finished Send and receive {0} compressed message using '{0}'", singleOrBatched, compressionType)
Log.Debug("Finished Send and receive {0} compressed message using {1}", singleOrBatched, compressionType)
}

let sendMessages enableBatching =
codecs
|> Seq.map (sendReceive enableBatching)
|> Task.FromResult
|> Array.map (sendReceive enableBatching)
|> Task.WhenAll


let sendNonBatchedMessages() = sendMessages false
let sendBatchedMessages() = sendMessages true

testList "Compression" [
testTask "Send and receive single compressed message using all implemented compression codecs" {
do! sendNonBatchedMessages()
let! _ = sendNonBatchedMessages()
return ()
}

testTask "Send and receive batched compressed message using all implemented compression codecs" {
do! sendBatchedMessages()
let! _ = sendBatchedMessages()
return ()
}
]

0 comments on commit 8f4b289

Please sign in to comment.