You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by GitBox <gi...@apache.org> on 2026/09/30 15:47:37 UTC

[GH] (pekko-connectors/mqtt-flow-test-hub-race): Workflow run "CI" is working again!

The GitHub Actions job "CI" on pekko-connectors.git/mqtt-flow-test-hub-race has succeeded.
Run started by GitHub user pjfanning (triggered by pjfanning).

Head commit for run:
8ff9cdbe7499d6d2a89a709cd2efd93605e59e39 / PJ Fanning <pj...@users.noreply.github.com>
MQTT Streaming: fix BroadcastHub race in server flow tests

Motivation:
MqttFlowTest.establishServerBidirectionalConnectionAndSubscribeToATopic
intermittently timed out: the server received the client's Connect but
never replied with ConnAck. The connection handler feeds events into a
BroadcastHub with two consumers - runForeach (which sends ConnAck,
SubAck and PubAck) and the source returned to flatMapMerge (drained by
Sink.ignore). BroadcastHub only holds elements while it has no
consumers, so if the returned source attached first, the Connect could
be delivered before runForeach attached and was never answered. The
leaked streams then also failed the next test's assertAllStagesStopped.

Modification:
Use BroadcastHub with startAfterNrOfConsumers = 2 in the server flow of
MqttFlowTest and MqttFlowSpec so no event is emitted until both
consumers are attached. This also fixes the documentation snippet.

Result:
The handler always sees the Connect, so the server test no longer
depends on consumer attach order.

Tests:
- sbt mqtt-streaming/Test/javafmt mqtt-streaming/Test/scalafmt mqtt-streaming/Test/compile
- sbt 'mqtt-streaming/testOnly docs.javadsl.MqttFlowTest docs.scaladsl.*' (x3):
  server flow tests pass in MqttFlowTest, TypedMqttFlowSpec and
  UntypedMqttFlowSpec; broker-dependent tests fail locally only because
  no MQTT broker was running (connection refused on localhost:1883)

References:
Refs #468

Report URL: https://github.com/apache/pekko-connectors/actions/runs/36736286444

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org