I tried to run unit test with Meteor version 3.5.2 (rspack enabled). When I remove --once flag, the test run keeps loading over and over again. Do you have solution for this problem?
WeKan has many tests, that are run with build.sh and build.bat . Maybe looking at those could help?
Hi, @minhna are you running meteor in the same folder?
Two runs could trigger each other.
Would you be able to share a small repro repo? I tested locally, and I could not reproduce it(testing on a Mac)
Thank you. Thatās the problem. I run the app and test the app on a different port.
Thank you. I found the issue: the app was running on a different port.
Nice that it is sorted!
Iāve asked some of my bots to take a look and it seems like the whole reason for the issue is that both runs still share the appās _build folder (which is an issue , fix in review). If you want to run the app and tests at the same time, give the test run its own local dir:
METEOR_LOCAL_DIR=.meteor/local-test meteor test --driver-package meteortesting:mocha --port 3100
adding METEOR_LOCAL_DIR env doesnāt solve my re-loading problem.
When I run meteor test, it adds these packages in .meteor/versions file:
meteortesting:browser-tests@1.8.0
meteortesting:mocha@3.4.0
meteortesting:mocha-core@8.2.0
But when I run the app `meteor run` it removes those packages.
Do you have any idea @grubba ?
Thanks for the extra details @minhna. Running the app alongside tests should work, and the .meteor/versions changes are a useful clue.
As @grubba mentioned, we have an open issue with a [fix under review](https://github.com/meteor/meteor/pull/14791) that weāre planning to include in an upcoming release. That addresses the shared Rspack files interfering with each other, but we still need to verify whether it also resolves your reload loop without --once. Weāll proceed on ensuring that.
Anyway, and to ensure we donāt miss any other further case, could you share a small repo that reproduces this, along with the exact commands you run in both terminals, any environment variables, and your OS? A reduced version of your app or a fresh Meteor 3.5.2 app is fine, as long as youāve confirmed it shows the same behavior. It would also help to know whether the reload loop stops when you stop the dev server and leave the tests running.
That would help us check whether the existing fix covers your case or whether the .meteor/versions changes need a separate follow-up. Otherwise, we will let you know when the ongoing fix gets included for you to double check.
UPDATE
I reproduced the .meteor/versions changes you pointed out, including with a separate METEOR_LOCAL_DIR. The test command writes its extra packages into the shared version file, and the running app removes them again.
Iāve opened a follow-up PR building on Perās scaffold fix, with an additional fix for the version-file conflict. The new core tests fail before that additional fix in both --once and watch mode, and pass after it. The watch case also verifies that tests rerun and the app updates after a source edit.
Itās still a draft targeting 3.6 and hasnāt been released yet. The local checks used filesystem polling, so Iād still like to confirm the full reload behavior with your setup before calling this resolved, in the next beta we include this fix.