Open zainab-ali opened 2 weeks ago
This comment was copied over from: https://github.com/disneystreaming/weaver-test/issues/475#issuecomment-1040050982 It was written by: Baccata
Now that CE3 has some proper test kit, we should be using it whenever relevant ... but that implies dropping CE2. Which I'm happy to do at this time.
This comment was copied over from: https://github.com/disneystreaming/weaver-test/issues/475#issuecomment-1698143419 It was written by: mcanlas
I wonder if I ran into this feature. I'm working on a codebase where we are using putLazyR
(not for any specific reason I don't think) and it initialized the resource twice. Yet when I use putLazyR
in a contrived sandbox using the code in the docs, it initializes once. Potential race condition with this feature???
This comment was copied over from: https://github.com/disneystreaming/weaver-test/issues/475#issuecomment-1700471030 It was written by: Baccata
mcanlas the Memoized resource that backs the putLazyR
is essentially meant to ensure that there's only a live one at any given time. This helps maximising available system resources when you have huge test benches with lots and lots of suites.
In the situation where a suite that uses the memoized resource would finish before a second suite that uses the same memoized resource starts, the resource would clean up after the first suite ends, and be re-initialised after the second suite starts. We cannot guarantee that it won't happen, because weaver has zero control over how many suites are run in parallel, that decision belongs to the build tool.
The reason this why this test is flaky is that it relies on actual sleeps, which makes any suite inherently flaky if they don't use CE's TestControl construct.
This issue was copied over from: https://github.com/disneystreaming/weaver-test/issues/475 It was opened by: keynmol
Not sure if it pops up more often because we're going through more SS updates or what.
Sample build: https://github.com/disneystreaming/weaver-test/runs/5133422123?check_suite_focus=true Another one: https://github.com/disneystreaming/weaver-test/runs/4781690405?check_suite_focus=true