Skip to content
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

Replace CI Services for Test Containers and move to JUnit 5 #43

Closed
smcvb opened this issue Dec 18, 2020 · 0 comments · Fixed by #44
Closed

Replace CI Services for Test Containers and move to JUnit 5 #43

smcvb opened this issue Dec 18, 2020 · 0 comments · Fixed by #44

Comments

@smcvb
Copy link
Member

smcvb commented Dec 18, 2020

Enhancement Description

The AMQP Extension currently requires a RabbitMQ to run for the SpringAMQPIntegrationTest.
As a consequence, in local environments this is never ran, is we tend to forget to set this up prior to building the project.

The problem was still covered by TravisCI during the build process, but unfortunately TravisCI has suddenly introduced a new "payment" format which doesn't suit our needs.
As ideas arose to move to GitHub Actions were already underway, that solution has been put in place right now.

This however means the SpringAMQPIntegrationTest is not run through the build process either.
As such, it is beneficial to move this test over to start using Test Containers.

On top of that, we should move this project to start using JUnit 5.

Current Behaviour

The SpringAMQPIntegrationTest expects RabbitMQ to run in the background.
Added, tests are ran through JUnit 4.

Wanted Behaviour

  • The SpringAMQPIntegrationTest should use Test Containers.
  • JUnit 5 should be used for testing.
@smcvb smcvb added this to the Release 4.5 milestone Dec 18, 2020
@smcvb smcvb self-assigned this Dec 23, 2020
smcvb added a commit that referenced this issue Dec 24, 2020
- Remove JUnit4 dependency
- Include JUnit5 dependencies
- Change all import statements
- Remove public keyword, as that's no longer required
- Switch usages of expected exception to assertThrows
- Introduce TestSerializer to allow for a secure XStreamSerializer
instance in tests
- Add javadoc to some for test clarity
- Remove warnings whenever applicable
- Add todos for items to pick up later

#43
smcvb added a commit that referenced this issue Dec 24, 2020
- Merge the two auto-config tests into one test class, which uses a
local ApplicationContextRunner to switch between configurations
- Define assertj and jackson test dependencies
- Resolve warnings in the AMQPAutoConfiguration
- Provide javadoc

#43
smcvb added a commit that referenced this issue Dec 24, 2020
Rewrite the SpringAMQPIntegrationTest to no longer use an auto
configuration, but instead create the required beans in the setUp, using
 the RabbitMQContainer as the means for communication.

#43
smcvb added a commit that referenced this issue Dec 24, 2020
Utilize a RabbitMQContainer in the RabbitMQBenchmark class to allow for
local benchmarking without being required to set up RabbitMQ yourself

#43
smcvb added a commit that referenced this issue Dec 24, 2020
Define the default security instances for the TestSerializer to ensure
security is set up correctly

#43
smcvb added a commit that referenced this issue Jan 4, 2021
Simply use artifact "junit-jupiter instead of separate arfects for
JUnit5

#43
@smcvb smcvb closed this as completed in #44 Jan 4, 2021
smcvb added a commit that referenced this issue Jan 4, 2021
[#43] Replace CI Services for Test Containers and move to JUnit 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant