-
Notifications
You must be signed in to change notification settings - Fork 196
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
multiple tests turns my computer into an oven #6316
Comments
The simulator (in test mode) creates every resource for every test, that's why there are 5 containers. It does for a reason: to be able to execute many tests in parallel, with isolated data. But... we might want to change that behavior since it's overkill in some situations (e.g. user only wants to execute one single test). On the Console's perspective, #6876 might address this issue. We're experimenting with the console test runner: the test simulator is only going to start when a test is going to be run. |
@Chriscbr what if the simulator didn't create multiple environments for every test, but they all shared the same environment? This has some benefits and enables some features:
|
@skyrpex Is it possible for the Wing Console to avoid starting test-simulator until the user clicks "run tests" or "run" on a particular test?
If I'm understanding your idea, then when I run I think the idea is starting to make sense to me after thinking on it for a while -- it might just be a bit of work to make sure simulators each get their own state directory and such. The only other issue I can think of is that now if two resources emit the same log/trace, the only difference would be that they're running on different simulators -- so every trace or log would also have to be associated with a simulator ID, which is a bit of extra bookkeeping to add everywhere. But it's probably doable. I was thinking of how else we could solve your problem (where running 1 test in the Wing Console causes more resources to be simulated than needed) -- as an alternative, the simulator could be more tightly integrated with the testing system, and expose an API for running a single test (which would start the simulator, and somehow only start the resources that are needed(?)). But this direction sounds more complex / brittle if I had to be honest. |
Yes, the problem is that users are allowed to run/enqueue tests as they wish, and concurrency errors will arise. For example:
That's why we would very much prefer to handle multiple simulators from the Console. We can instantiate one simulator per running test, and stop it after the test was run.
Yeah, I think the simplest approach is to let the console and the wing cli to handle the creation of multiple simulators. It should be a straightforward process, though... |
Congrats! 🚀 This was released in Wing 0.79.15. |
I tried this:
Use the following
This happened:
The result are 5 postgres docker containers (and any other thing I put there) even if I don't run the tests.
I expected this:
To only load these containers when needed
Is there a workaround?
No response
Anything else?
No response
Wing Version
0.70.27
Node.js Version
No response
Platform(s)
No response
Community Notes
The text was updated successfully, but these errors were encountered: