What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
π is it possible to substitute the rabbit mq transport with an in-memory transport for testing?
Comments
-
as long as it implements AMQP should be possible.
0 -
the end goal would be to process all event synchronously
0 -
maybe this isn't the best way to approach (replacing the transport)
0 -
You could have some problems related to the execution environment of the various PHP workers, especially if you couple them all into the same execution for a test.
0 -
Do you want to test that records are arriving in Redis? What's the focus of your test?
0 -
E2E testing with an infrastructural replacement might give you incorrect results.
0 -
idea would be to test the whole lifecycle in-process, mainly for development purposes
0 -
so you persist the entity, it's published to e/s + redis
0 -
or similar -- not sure
0 -
previously we have been triggering events in integration tests and launching worker processes from the test, but it's slow
0 -
I don't know of anyone who's tried it, and I suspect there will be some technical problems to overcome before you can make it work.
0 -
It's a cool goal but I think this will be a lot of work.
0 -
I think we previously actually tried running the workers in-process, which would accomplish testing goals, but there were issues there, but maybe they could be fixed (can't remember now)
0 -
Is the main pain point for you speed, or are you searching to fix some other issues too?
0 -
speed - and easier debugging/discovery when developing features via tests (i.e. not debugging across processes)
0 -
I still don't have a solution for you here, but I can bring this up more when discussing this internally.
It's probably not the user-experience you want, but I've used tcpdump in the past when I had to debug really complex Spryker things that make network calls.
0 -
also running in a single process means you can run the test in a transaction
0 -
This is an interesting point, the design is eventually consistent instead of transactional (for various reasons).
0 -
yeah, running the test in a transaction is just a cheap way to help ensure that the test doesn't leak database state
0 -
Agreed, there's some interesting upsides to it
0 -
If you log this in our support portal it can become a feature request our product owners can see.
0 -
In this case not a support portal should be used but https://spryker.ideas.aha.io/ideas/new
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random