Skip to content

Use management tag for RabbitMQ image on GH actions #1283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
3 changes: 2 additions & 1 deletion .github/workflows/pr-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ jobs:

services:
rabbitmq:
image: rabbitmq
image: rabbitmq:management
ports:
- 5672:5672
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need to map the management port (15762)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copy/paste all of this stuff blindly 😄
Is that just enough to have another entry like - 15762:15762 ?
Do we have some tests for that to be sure that they run properly?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm - now I don't know how the previous PR builds were good; for example RabbitAdminIntegrationTests has @RabbitAvailable(management = true)

But we have other tests (e.g. EnableRabbitIntegrationTests) that don't check for the management plugin is available, but require it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh; it has a try/catch

	@Test
	public void deadLetterOnDefaultExchange() {
		this.rabbitTemplate.convertAndSend("amqp656", "foo");
		assertThat(this.rabbitTemplate.receiveAndConvert("amqp656dlq", 10000)).isEqualTo("foo");
		try {
			Client rabbitRestClient = new Client("http://localhost:15672/api/", "guest", "guest");
			QueueInfo amqp656 = rabbitRestClient.getQueue("/", "amqp656");
			if (amqp656 != null) {
				assertThat(amqp656.getArguments().get("test-empty")).isEqualTo("");
				assertThat(amqp656.getArguments().get("test-null")).isEqualTo("undefined");
			}
		}
		catch (Exception e) {
			// empty
		}
	}

- 15762:15762

steps:
- uses: actions/checkout@v2
Expand Down