lucono/karma-test-explorer

Cannot run new test - Another test operation is still running

Charuru opened this issue · 1 comments

Get the Cannot run new test - Another test operation is still running whenever I click to run a new test from the test ui. The only way new tests work is via saving a test file, which automatically runs a new test.

Looks to me like the old tests aren't ending correctly, in the logs I see things like:

[2022-10-31 17:45:44.923] [DEBUG] [KarmaTestRunProcessor]: Test run ending now with test run Id 'undefined' is not for the current requested test run Id: u3dgjvqv4mg

Steps to Reproduce the Behavior

  1. Use the provided project, install
    testuierror.zip
  2. open in vsc
  3. Click on any of the run tests button
  4. Get the error popup
[2022-10-31 17:45:44.624] [DEBUG] [TestLocator]: File is determined to be a spec file: /Users/aaa/Documents/projects/testfail2/test/perk.test.js
[2022-10-31 17:45:44.624] [DEBUG] [FileWatcher]: Changed file is spec file: /Users/aaa/Documents/projects/testfail2/test/perk.test.js
[2022-10-31 17:45:44.624] [DEBUG] [TestLocator]: Refresh requested for 1 spec file(s): ["/Users/aaa/Documents/projects/testfail2/test/perk.test.js"]
[2022-10-31 17:45:44.624] [DEBUG] [TestLocator]: No refresh currently in progress - will commence new refresh for files: ["/Users/aaa/Documents/projects/testfail2/test/perk.test.js"]
[2022-10-31 17:45:44.624] [DEBUG] [TestLocator]: Refreshing 1 spec file(s): ["/Users/aaa/Documents/projects/testfail2/test/perk.test.js"]
[2022-10-31 17:45:44.625] [DEBUG] [TestLocator]: Requested --> filtered file count to refresh: 1 --> 1
[2022-10-31 17:45:44.625] [DEBUG] [SimpleFileHandler]: Reading file async: /Users/aaa/Documents/projects/testfail2/test/perk.test.js
[2022-10-31 17:45:44.626] [DEBUG] [AstTestFileParser]: Parse operation w4wrqe6umja: Parsed 1 total tests from file '/Users/aaa/Documents/projects/testfail2/test/perk.test.js' in 0.00 secs
[2022-10-31 17:45:44.626] [DEBUG] [TestLocator]: Refreshed 1 spec files from file list in 0.00 secs: ["/Users/aaa/Documents/projects/testfail2/test/perk.test.js"]
[2022-10-31 17:45:44.900] [DEBUG] [KarmaTestRunProcessor]: Ignoring received karma event: file_list_modified
[2022-10-31 17:45:44.900] [DEBUG] [KarmaTestRunProcessor]: Test run started for browsers: Chrome Headless 107.0.5304.87 (Mac OS 10.15.7)
[2022-10-31 17:45:44.900] [DEBUG] [KarmaTestRunProcessor]: New test run starting with id 'undefined' is not for the current requested test run Id: u3dgjvqv4mg
[2022-10-31 17:45:44.900] [DEBUG] [KarmaAutoWatchTestEventProcessor]: Beginning ambient test event processing
[2022-10-31 17:45:44.900] [DEBUG] [KarmaAutoWatchTestEventProcessor::KarmaTestEventProcessor]: Request to begin test event processing
[2022-10-31 17:45:44.900] [DEBUG] [KarmaAutoWatchTestEventProcessor::KarmaTestEventProcessor]: Proceeding to begin processing test events
[2022-10-31 17:45:44.919] [DEBUG] [KarmaTestRunProcessor]: Test run started in browser: Chrome Headless 107.0.5304.87 (Mac OS 10.15.7)
[2022-10-31 17:45:44.920] [DEBUG] [KarmaTestRunProcessor]: Ignoring received karma event: browser_info
[2022-10-31 17:45:44.920] [DEBUG] [KarmaTestRunProcessor]: Ignoring received karma event: browser_log
[2022-10-31 17:45:44.923] [DEBUG] [KarmaTestRunProcessor]: Processing received spec id 'spec0' with test processor: KarmaAutoWatchTestEventProcessor
[2022-10-31 17:45:44.923] [DEBUG] [KarmaAutoWatchTestEventProcessor]: Processing ambient test result event for test id: spec0
[2022-10-31 17:45:44.923] [DEBUG] [KarmaAutoWatchTestEventProcessor::KarmaTestEventProcessor]: Request to process test result event having status: Success
[2022-10-31 17:45:44.923] [DEBUG] [KarmaAutoWatchTestEventProcessor::KarmaTestEventProcessor]: Processing test result event for test id: spec0
[2022-10-31 17:45:44.923] [DEBUG] [KarmaTestRunProcessor]: [SUCCESS] ✅ Passed - Chrome Headless 107.0.5304.87 (Mac OS 10.15.7)
[2022-10-31 17:45:44.923] [DEBUG] [KarmaTestRunProcessor]: Ignoring received karma event: browser_info
[2022-10-31 17:45:44.923] [DEBUG] [KarmaTestRunProcessor]: Ignoring received karma event: browsers_change
[2022-10-31 17:45:44.923] [DEBUG] [KarmaTestRunProcessor]: Test run completed in browser: Chrome Headless 107.0.5304.87 (Mac OS 10.15.7)
[2022-10-31 17:45:44.923] [DEBUG] [KarmaTestRunProcessor]: Ignoring received karma event: browser_complete_with_no_more_retries
[2022-10-31 17:45:44.923] [DEBUG] [KarmaTestRunProcessor]: Test run completed with status 'Complete' for browsers: Chrome Headless 107.0.5304.87 (Mac OS 10.15.7)
[2022-10-31 17:45:44.923] [DEBUG] [KarmaTestRunProcessor]: Test run ending now with test run Id 'undefined' is not for the current requested test run Id: u3dgjvqv4mg
[2022-10-31 17:45:44.923] [DEBUG] [KarmaAutoWatchTestEventProcessor::KarmaTestEventProcessor]: Request to conclude test event processing
[2022-10-31 17:45:44.923] [DEBUG] [KarmaAutoWatchTestEventProcessor::KarmaTestEventProcessor]: Test event processor is currently processing - Concluding current processing
[2022-10-31 17:45:44.923] [DEBUG] [KarmaAutoWatchTestEventProcessor::KarmaTestEventProcessor]: Aggregate test stats will not be emitted because emit test stats is disabled for the current event processor
[2022-10-31 17:45:44.923] [DEBUG] [KarmaAutoWatchTestEventProcessor]: Concluding ambient test event processing
[2022-10-31 17:45:44.923] [DEBUG] [KarmaAutoWatchTestEventProcessor]: Retiring 0 skipped ambient test ids
[2022-10-31 17:45:44.924] [DEBUG] [KarmaAutoWatchTestEventProcessor]: Done concluding ambient test event processing
[2022-10-31 17:45:44.924] [DEBUG] [KarmaAutoWatchTestEventProcessor]: Processing ambient test load events
[2022-10-31 17:45:44.924] [DEBUG] [DefaultTestBuilder]: Focus filter criteria includes test id: spec0
[2022-10-31 17:45:44.924] [DEBUG] [DefaultTestBuilder]: Processed 1 specs to build tests
[2022-10-31 17:45:44.924] [DEBUG] [TestSuiteOrganizer]: Rearranged 1 test files into folders
[2022-10-31 17:45:44.924] [DEBUG] [TestDiscoveryProcessor]: Test discovery - 1 total tests discovered from Karma
[2022-10-31 17:45:44.924] [DEBUG] [TestStore]: Clearing stored tests
[2022-10-31 17:45:44.924] [DEBUG] [TestStore]: Updating stored tests
[2022-10-31 17:45:44.925] [DEBUG] [KarmaAutoWatchTestEventProcessor]: Done processing ambient test load events
[2022-10-31 17:47:09.854] [DEBUG] [KarmaTestExplorer]: Cannot run new test - Another test operation is still running
[2022-10-31 17:47:09.854] [DEBUG] [NotificationHandler]: Showing 'Warning' notification with actions  and message: Cannot run new test - Another test operation is still running

Screenshots

  • If applicable, add screenshots to help explain the issue you are having.

Please Provide the Following Information

  • OS: OSX
  • Node Version: v16.18.0
  • VS Code Version: 1.72.2
  • Karma Version: 6.4.1
  • Frameworks: Jasmine

Okay I had the settings in CLI interface instead of HTTP interface, changing to HTTP interfaced fixed this. I'm not sure as I don't recall changing it, maybe it used to be CLI by default in an older version? Since I can use HTTP I just close this.