I have recently migrated my application from Axon 3.x to Axon 4. Previously I would direct axon to use a defined database, one that was set up for dev/production, and was replaced by an in-memory database for end to end testing.
Now that I am using Axon 4 with Axon Server, I am a little unsure how best to handle this setup. Essentially in the dev space, I would like to be able to instantiate a version of axon server with a separate database, just for the case of end to end tests. The closest i've gotten to is starting axon server jar in a specified location, using defined paths for the database/events/snapshots (so I can clear them post-test to avoid contamination between tests), leveraging Junit5 callbacks (BeforeAllCallback, AfterAllCallback) and a process builder, however i'm currently having some thread/locking issues, causing the database migration to fail.
I'll continue to go down this path, but would like to know if there's perhaps a better way to approach this problem that I have overlooked. Any advice is greatly appreaciated.