Prevent `meteor test` from dropping the database?

Hi, just trucking on developing here…

The thing is, we have an e2e test suite and whilst development I like running against it + i use it as my “development server” at the same time, because, honestly, two meteor instances building in parallel, especially with intellij’s “save at every tab switch” - approach sounds like an early heat death coming for my poor Notebook CPU rather sooner than later :sunny:.

Now I was wondering, why is the database sometimes gone? -> And now it dawned on me: it’s getting cleared out by Meteor itself on the start of each meteor test - session! :slight_smile:

I never thought about it because we’re doing all the setup, data loading + resetting for the tests manually anyways, so for us that’s a waste of time…

And especially it’s a bit bothersome for me right now, because I like to stop and restart my development server from time to time and continue on trucking.

Right now I have to run a test to setup our initial fixture data etc, which really isn’t a big deal, but I’d really also like to handle that myself.

SO: Is there an option (sneaky environment variable? Magic switch combination?) to run with the tmeasday:acceptance-test-driver - package without my database getting razed on every run?

Nope, pretty normal behavior. You need to load the snapshot that you want to run your E2E on or start with an empty db. That’s the only choice.

Be ready for some long waiting time, even for a small and almost empty db. Our E2E ran 40 minutes on AWS until we decided we cannot wait so long and are now skipping them as part of the CI/CD.

But we switched to Electron as a client anyway and the E2E no longer run on it.

Do tests pick up and use the MONGO_URL? Because that would be easiest if it does

Hi Guys, thank you for the input.

@a4xrbj1 yes, maybe that’s a good idea to just load a snapshot / initialize the default values as we like on startup.

Cya! :smiley: