Skip to content

Commit

Permalink
Fix / adapt specs
Browse files Browse the repository at this point in the history
  • Loading branch information
AL333Z committed Sep 20, 2024
1 parent f924bcd commit e04f089
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ trait QueueStatisticsSuite extends CatsEffectSuite { self: QueueClientSuite =>
client = clientFixture()
_ <- Stream
.emits(messages) // putting a really long delay so that the test can pass even in slow envs
.through(client.publish(queueName).sink(batchSize = 30, delay = 1.minute.some))
.through(client.publish(queueName).sink(batchSize = 10, delay = 1.minute.some))
.compile
.drain
_ <- client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ trait QueueSubscriberSuite extends CatsEffectSuite { self: QueueClientSuite =>
toBeNacked <- toBeNackedRef.get
_ = assertEquals(toBeAcked, Set("0", "2", "4", "6", "8"))
_ = assertEquals(toBeNacked, Set("1", "3", "5", "7", "9"))
remaining <- client.statistics(queueName).fetcher.use(_.fetch).map(_.messages)
_ = assertEquals(remaining, 5, "not all the expected messages got nacked")
stats <- client.statistics(queueName).fetcher.use(_.fetch)
// it may take a while to move the inflight messages back
_ = assert(stats.messages + stats.inflight.getOrElse(0) == 5, "not all the expected messages got nacked")
} yield ()
}

Expand Down

0 comments on commit e04f089

Please sign in to comment.