Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/nuget_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ jobs:
--health-timeout=5s
--health-retries=5
rabbitmq:
image: rabbitmq:3
# Default 'guest' user is restricted to localhost in RabbitMQ.
# GitHub Actions service containers route through port forwarding,
# so the broker sees connections as non-localhost and rejects
# 'guest'. Override with a dedicated test user.
image: rabbitmq:4-management
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
RABBITMQ_DEFAULT_USER: trax
RABBITMQ_DEFAULT_PASS: trax123
ports:
- 5672:5672
options: >-
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ jobs:
--health-timeout=5s
--health-retries=5
rabbitmq:
image: rabbitmq:3
# Default 'guest' user is restricted to localhost in RabbitMQ.
# GitHub Actions service containers route through port forwarding,
# so the broker sees connections as non-localhost and rejects
# 'guest'. Override with a dedicated test user.
image: rabbitmq:4-management
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
RABBITMQ_DEFAULT_USER: trax
RABBITMQ_DEFAULT_PASS: trax123
ports:
- 5672:5672
options: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void UseRabbitMq_RegistersOptions()
var builder = new TraxBuilder(services, registry);

builder.AddEffects(effects =>
effects.UseBroadcaster(b => b.UseRabbitMq("amqp://guest:guest@localhost:5672"))
effects.UseBroadcaster(b => b.UseRabbitMq("amqp://trax:trax123@localhost:5672"))
);

services.Should().Contain(sd => sd.ServiceType == typeof(RabbitMqBroadcasterOptions));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ namespace Trax.Effect.Tests.Broadcaster.UnitTests;
/// <summary>
/// Integration tests that exercise <see cref="RabbitMqTrainEventBroadcaster"/> and
/// <see cref="RabbitMqTrainEventReceiver"/> against a real RabbitMQ broker.
/// CI provisions a rabbitmq:3 service container; locally a developer-mode broker
/// listens on amqp://guest:guest@localhost:5672/.
/// CI provisions a rabbitmq:4-management service container with a dedicated
/// 'trax' user (default 'guest' is restricted to localhost in RabbitMQ, and CI
/// service containers route through port forwarding so the broker sees
/// non-localhost connections). The Trax.Samples docker-compose broker is
/// configured the same way for local parity.
/// </summary>
[TestFixture]
public class RabbitMqBroadcasterIntegrationTests
{
private const string AmqpUri = "amqp://guest:guest@localhost:5672/";
private const string AmqpUri = "amqp://trax:trax123@localhost:5672/";

private static RabbitMqBroadcasterOptions Options(string suffix) =>
new()
Expand Down
Loading