Errors when using TestCoverage, 'Somebody else is using the Monitor'
When running the command
do ##class(TestCoverage.Manager).RunTest(,"/nodelete",.userParams)
I now get the following error. these tests used to run fine.
LogStateStatus:0:TestCoverage.Manager:OnBeforeAllTests:ERROR #6060: Somebody else is using the Monitor. <<==== **FAILED**
Can someone please point me in the right direction?
Product version: IRIS 2021.1
Calling @Timothy Leavitt
@Chris Marais This means that ^PERFMON or ^%SYS.MONLBL is already running somewhere on the system. If you do ^%SYS.MONLBL it should provide some helpful output/options.
Hi all,
I am also having an issue on the code coverage. On my side, there is not an error, but there are no results.
Version: IRIS 2021.1
I've tried this this with RunTest and RunAllTests.
After running the tests:
Any advice will be appreciated.
@Stefan Cronje I've sent you a message. The discussion at https://github.com/intersystems/TestCoverage/issues/10
is relevant but I think your root cause may be different.
Basic troubleshooting steps / things to think about:
* Is the line-by-line monitor running? (do ^%SYS.MONLBL and see what it says)
* Do you have .int code for the classes for which you're measuring coverage? (compile with the "k" flag to keep this around)
* Did you say what classes/routines you wanted to measure coverage of? (see instructions at https://github.com/intersystems/TestCoverage)
Given that two people have run into this now I think there's something that should be changed to help avoid the situation. Perhaps forcing the line-by-line monitor/PERFMON to stop (if it's running) prior to starting it for a test coverage run and/or identifying possible causes of the issue.
Per message from @Stefan Cronje the issue was a missing coverage.list. I've filed https://github.com/intersystems/TestCoverage/issues/11 to cover an enhancement to fail early and descriptively in this case rather than just doing nothing.
It's also possible that %objlasterror is leaking without that error being the root cause of any issues. I'd start by looking at how you're saying which units of code to measure coverage for - e.g., via coverage.list or an explicit list passed in to the CoverageClasses/CoverageRoutines parameter as described at https://github.com/intersystems/TestCoverage
I am back on this posting again.
I started running the tests on a Ubuntu serv
The %objlasterror still contained the error about being unable to stop the %Monitor, but this is very misleading.
What the cause of the issue was, and this might not be obvious to everyone, is the line terminators in the coverage.list file.
On Windows it was CRLF, which worked fine. When using those files on Ubuntu, the file lines are read, but including the trailing CR, which caused it not to detect the packages listed in the file correctly:(PKG(CR) '= PKG
It would be a nice to have the file loader strip out the CR's from the filestream before performing the readlines on a *nix OS.
Social networks
InterSystems resources
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue