doo icon indicating copy to clipboard operation
doo copied to clipboard

'auto' mode with Karma: suite runs again before completion, on file changes

Open vemv opened this issue 6 years ago • 2 comments

Hi!

I found out that when running e.g. lein doo chrome-headless dev (this is, 'auto' mode), when one touches a file, the test suite will be run again even though the current one may not have finished.

For example, for this never-ending test:

(deftest sample
  (testing "A test that never completes"
    (async done)))

When I leave the test suite running 'forever' (which won't fail given my :doo {:paths {:karma "karma --browserNoActivityTimeout 600000"}} setting), with each file save the suite will be triggered again.

The correct behavior would be to wait till completion, rather than have concurrently-running suites (that's what I think that can happen at times).

I created a repro repo, fortunately with just 1 isolated relevant commit: https://github.com/vemv/doo-repro/commit/94d37efbe4585e612256ef09d699d085ade7a350

Dunno if I'm the first to notice this. I reckon that without browserNoActivityTimeout the issue is harder to notice. I need that setting for performing Selenium-like tests.

Cheers - Victor

vemv avatar Oct 29 '17 20:10 vemv

Btw when I close a long auto testing session I can read this:

Close Karma run
Close Karma run
Close Karma run
Close Karma run
Close Karma run
Close Karma run
Close Karma run
Close Karma run
Close Karma run
Close Karma run
Close Karma run
Shutdown Karma Server
Close Karma run
Close Karma run
Close Karma run

vemv avatar Oct 30 '17 14:10 vemv

I see the same problem: there're numerous Karma "run"s created and their log outputs interleave.

Also often the whole "lein doo" process fails after several runs, maybe it can be related.

metametadata avatar May 11 '18 19:05 metametadata