Closed imann24 closed 1 year ago
This does look like a bug, and at the moment I have no explanation as to where the ocmock_replaced_ocmock_replaced___new
comes from. It tries to invoke this selector but that could easily be a side effect from (erroneously) having redirected the new
method twice.
One thing I wonder, if I read the stack trace correctly, the problem occurs during the logging of a message. Is it fair to assume that this is not part of the actual test? Do the crashes stop if you comment out the logging?
Hi, pardon the delayed response. And thanks very much for the guidance.
To clarify, this crash is occurring within the test itself not from logging I've added. I've verified there are no invocations of NSLog
in the failing test and I can still observe failures if I add the -quiet
flag to my xcodebuild
command
It's somewhat opaque to me exactly where the crash is occurring, since it's only reproducible from the command line
Hi, I'm seeing occasional unit test failures when running tests via
xcodebuild
. These tests all fail with the same error (see below)I cannot reproduce when running unit tests via the Xcode UI and re-running the test suite typically yields no errors.
Xcode Version: 10.1
xcodebuild
command: OCMock Version: 3.4.3Additional Context: Most of the test classes which exhibit these failures have mocking calls related to
NSDictionary
such asOCMPartialMock([NSMutableDictionary dictionary])
orOCMClassMock([NSDictionary class])
Error: